READMEmain
We couldn't render this README. Read it on GitHub
SauceDemo Automated Tests
This project contains automated tests for the SauceDemo website using Playwright.
Prerequisites
- Node.js (v14 or higher)
- npm (comes with Node.js)
Setup
- Install dependencies:
npm install
- Install Playwright browsers:
npx playwright install
Running Tests
Run all tests in headless mode:
npm test
Run tests with browser visible:
npm run test:headed
Run tests with Playwright UI mode:
npm run test:ui
View the last test report:
npm run report
Project Structure
src/pages/- Page Object Modelssrc/tests/- Test filese2e/- End-to-end testsintegration/- Integration testsapi/- API tests
src/fixtures/- Test datasrc/types/- TypeScript interfacessrc/utils/- Utility functionsplaywright.config.ts- Playwright configurationpackage.json- Project dependencies and scripts
Features
- Page Object Model implementation
- Cross-browser testing (Chrome, Firefox, Safari)
- HTML report generation
- Parallel test execution
- Automatic retries in CI
- Screenshot on test failure