Pick a public web app (demoqa.com, saucedemo.com, or similar demo app). Build a Playwright test suite with: a Page Object Model covering at least 3 pages, 15+ test cases (happy path, negative, edge cases), visual regression snapshot for one key page, and a GitHub Actions workflow that runs on every push. Generate your first draft test cases using an AI prompt template, then enrich them manually. The suite must pass in CI with zero flaky failures over 3 consecutive runs.
npx playwright codegen https://saucedemo.com to generate a starting point, then refactor into POM.npx playwright test --repeat-each=3 locally before pushing to CI to catch flakiness early.$ npx playwright test
Running 15 tests using 3 workers
✓ login.spec.ts > valid credentials login (1.2s)
✓ login.spec.ts > locked out user gets error (0.8s)
✓ inventory.spec.ts > sort products by price low-high (1.5s)
✓ cart.spec.ts > add item increments cart badge (1.1s)
✓ checkout.spec.ts > complete checkout shows confirmation (3.2s)
... 10 more passing
15 passed (18.4s)
$ cat .github/workflows/playwright.yml | grep "if: always"
if: always() ← artifacts upload even on failure
page.route(...)) and test that the UI handles a 500 error gracefully.tracing API.