Automated end-to-end tests for saucedemo.com using Playwright.
- Login tests (including data-driven from JSON and CSV)
- Product listing and sorting tests
- Cart and checkout flow tests
- Page Object Model structure
- CI integration with GitHub Actions (sharded test runs, HTML reports)
npm installCreate a .env file in the project root with:
USERNAME=your_saucedemo_username
PASSWORD=your_saucedemo_password
BASE_URL=https://www.saucedemo.com
npx playwright testTo run a specific test file:
npx playwright test tests/login.spec.tsAfter running tests:
npx playwright show-report- User credentials:
data/users.json,data/users.csv - Product data:
data/products.json
pages/- Page Object Model classestests/- Test suitesutils/- Helper utilitiesfixtures/- Playwright fixtures.github/workflows/- GitHub Actions CI config
Tests run automatically on push/PR via GitHub Actions workflow, with sharding and HTML report upload.
- Install Playwright browsers:
npx playwright install --with-deps - Run tests with sharding:
npx playwright test --shard=1/2
npx playwright test --shard=2/2