

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# Project: WebdriverIO Test Automation Framework23## Framework Structure4- Use WebdriverIO (WDIO) as the primary test runner and automation framework5- Implement Page Object Model pattern with dedicated page classes6- Organise specs, page objects, and helpers in separate directories7- Use TypeScript for type-safe test implementations8- Configure wdio.conf.ts as the single source of truth for runner settings910## Coding Standards11- Follow TypeScript and ESLint best practices12- Use Prettier for consistent code formatting13- Maximum line length: 100 characters14- Use async/await for all browser interactions; never mix callbacks with async patterns15- Name page object files with `.page.ts` suffix (e.g. `login.page.ts`)1617## Test Organisation18- Group related tests in `describe` blocks reflecting user journeys or features19- Use `it`/`test` with descriptive names that read as requirements20- Keep specs focused: one user story or scenario per spec file21- Use Mocha hooks (`before`, `beforeEach`, `after`, `afterEach`) for setup and teardown22- Separate smoke, regression, and integration suites in `wdio.conf.ts` via `suites`2324## Best Practices25- Rely on WDIO's built-in auto-waiting; avoid manual `browser.pause()` calls26- Use `$` / `$$` selectors with `data-testid` attributes for stable element references27- Chain assertions with `expect()` from `@wdio/globals` for readable output28- Keep page objects free of assertions; put assertions in spec files only29- Use `browser.url()` with relative paths; set `baseUrl` in config3031## Element Handling32- Prefer semantic selectors: `aria/`, role-based, then `data-testid`, last resort CSS33- Cache selectors as getter properties in page objects for lazy evaluation34- Use `waitForDisplayed`, `waitForEnabled`, and `waitForExist` with explicit timeouts35- Handle iframes with `browser.switchToFrame()` and always switch back after interaction36- Interact with shadow DOM via `shadow$` / `shadow$$` selectors3738## Page Object Pattern39```typescript40// pages/login.page.ts41import { $ } from '@wdio/globals'4243class LoginPage {44 get emailInput() { return $('[data-testid="email-input"]') }45 get passwordInput() { return $('[data-testid="password-input"]') }46 get submitButton() { return $('[data-testid="submit-button"]') }47 get errorMessage() { return $('[data-testid="error-message"]') }4849 async open() {50 await browser.url('/login')51 }5253 async login(email: string, password: string) {54 await this.emailInput.setValue(email)55 await this.passwordInput.setValue(password)56 await this.submitButton.click()57 }58}5960export default new LoginPage()61```6263## Test Data Management64- Store test credentials and base URLs in environment variables via `dotenv`65- Use fixtures for reusable datasets; never hardcode sensitive values in specs66- Generate dynamic test data with `@faker-js/faker` for isolation between runs67- Clean up created test data in `after`/`afterEach` hooks or via API calls6869## Configuration70- Define separate `wdio.conf.ts` files for local, CI, and cross-browser runs71- Enable `headless` mode in CI; keep headed mode available for local debugging72- Set `maxInstances` and `bail` values appropriate to the target environment73- Configure `specFileRetries` sparingly (1–2 max) to handle genuine flakiness74- Use `@wdio/allure-reporter` or `spec` reporter based on environment7576## API Integration77- Call REST endpoints directly in `before` hooks to seed or reset state78- Use `browser.mock()` to intercept and stub network requests in component tests79- Validate API responses alongside UI assertions for end-to-end coverage80- Prefer API teardown over UI teardown for speed8182## Visual Testing83- Integrate `@wdio/visual-service` for screenshot comparison84- Store baseline images under version control in a dedicated `visual-baselines/` folder85- Update baselines intentionally with `--updateSnapshots` flag; review diffs in PRs86- Mask dynamic regions (timestamps, ads) to reduce false positives8788## Mobile Testing89- Extend the same Page Object pattern for Appium-backed WDIO mobile configs90- Use `driver.isAndroid` / `driver.isIOS` guards only where platform behaviour differs91- Manage real-device or emulator caps in separate `wdio.mobile.conf.ts`9293## CI/CD Integration94- Run WDIO in parallel with `--maxInstances` tuned to available CI workers95- Upload Allure or JUnit XML reports as CI artefacts for every pipeline run96- Fail the pipeline on test failure; use exit code from `wdio` CLI directly97- Cache `node_modules` and browser binaries between pipeline runs for speed9899## Reporting100- Use `@wdio/allure-reporter` for detailed HTML reports with screenshots on failure101- Attach screenshots automatically in `afterTest` hook when the test fails102- Capture browser logs and append to report output for debugging103- Configure `--reporter=spec` locally for readable terminal output104105## Documentation106- Document selector strategy and page object conventions in `docs/CONTRIBUTING.md`107- Maintain a `README.md` with setup instructions, environment variables, and run commands108- Add JSDoc comments to page object methods describing parameters and side effects109- Include architecture diagram showing config → spec → page object → helper relationships110111Remember to leverage WebdriverIO's protocol-agnostic design: the same framework configuration supports Selenium, Chrome DevTools Protocol (CDP), and Appium with minimal changes.112
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| tugkanboz/awesome-cursorrulesexample-structures/cypress/.cursor/rules/testing-fundamentals.mdc · 19 | Cursor rules | testarchtesting-strategysecurity+2 | 62/100 | 13 days ago | |
| tugkanboz/awesome-cursorrulesexample-structures/selenium-python/.cursor/rules/page-object-patterns.mdc · 19 | Cursor rules | ui | 54/100 | 13 days ago | |
| tugkanboz/awesome-cursorrulesexample-structures/cypress/.cursor/rules/api-testing.mdc · 19 | Cursor rules | testtesting-strategyapi | 58/100 | 13 days ago | |
| tugkanboz/awesome-cursorrulesexample-structures/next-js/.cursor/rules/app-router-patterns.mdc · 19 | Cursor rules | styleapido-not | 65/100 | 13 days ago | |
| tugkanboz/awesome-cursorrulesexample-structures/react-typescript/.cursor/rules/component-development.mdc · 19 | Cursor rules | teststylearchtypes+1 | 58/100 | 13 days ago | |
| tugkanboz/awesome-cursorrulesexample-structures/selenium-python/.cursor/rules/framework-architecture.mdc · 19 | Cursor rules | setuptestlint-formatstyle+3 | 93/100 | 13 days ago | |
| tugkanboz/awesome-cursorrulesframeworks/cypress/.cursor/rules/cypress-excellence.mdc · 19 | Cursor rules | testtesting-strategysecurityperformance+1 | 58/100 | 13 days ago | |
| tugkanboz/awesome-cursorrulesrules/appium-mobile-test-automation-framework/.cursorrules · 19 | .cursorrules | teststylearchperformance+2 | 56/100 | 13 days ago | |
| tugkanboz/awesome-cursorrulesrules/cypress-javascript-test-automation-framework/.cursorrules · 19 | .cursorrules | testlint-formatstylearch+4 | 59/100 | 13 days ago | |
| tugkanboz/awesome-cursorrulesrules/k6-performance-test-framework/.cursorrules · 19 | .cursorrules | setupteststylearch+2 | 56/100 | 13 days ago | |
| tugkanboz/awesome-cursorrulesrules/playwright-javascript-test-automation-framework/.cursorrules · 19 | .cursorrules | testlint-formatstylearch+3 | 59/100 | 13 days ago | |
| tugkanboz/awesome-cursorrulesrules/selenium-net-test-automation-framework/.cursorrules · 19 | .cursorrules | teststylearchdeployment+1 | 56/100 | 13 days ago | |
| tugkanboz/awesome-cursorrulesrules/selenium-python-test-automation-framework/.cursorrules · 19 | .cursorrules | testlint-formatstylearch+3 | 59/100 | 13 days ago | |
| tugkanboz/awesome-cursorrulesrules/vitest-javascript-unit-test-framework/.cursorrules · 19 | .cursorrules | setupteststylearch+5 | 60/100 | 13 days ago | |
| tugkanboz/awesome-cursorrulesrules/restassured-java-framework/.cursorrules · 19 | .cursorrules | teststylearchsecurity+4 | 56/100 | 13 days ago | |
| tugkanboz/awesome-cursorrulesexample-structures/selenium-python/.cursor/rules/test-patterns.mdc · 19 | Cursor rules | teststylearchtesting-strategy+1 | 66/100 | 13 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/tugkanboz-awesome-cursorrules-rules-webdriverio-javascript-test-automation-framework-cursorrules)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.