PLAYWRIGHT-TEST-PRACTICE
Automated end-to-end testing suite using Playwright and TypeScript, with modular Page Object Model and integrated performance testing via Artillery.
- ✅ Automated UI tests using Playwright
- ✅ API and performance testing using Artillery
- ✅ Interactive HTML test reports
- ✅ CI/CD config example
- Node.js installed
- Recommended: VS Code with Playwright extension
Follow these steps to set up the project locally:
Clone the project:
git clone https://github.com/vmcs29/playwright-test-practice.gitInstall dependencies:
npm installInstall Playwright browsers:
npx playwright installnpx playwright testnpx playwright test tests/ui/sauceTests.spec.tsnpx playwright test -g "Login with invalid credentials shows error"📊 View HTML Report
npx playwright show-reportThis project includes load testing using Artillery, targeting the SauceDemo login flow.
npx artillery run performance/saucedemo-login.yml📈 Generate Performance Report
npx artillery run performance/saucedemo-login.yml --output performance/reports/report.jsonnpx artillery report performance/report.jsonNote: This simulates login by sending form data to /, mimicking the client-side login flow.
playwright-test-practice/
├── tests/
│ ├── ui/
│ │ └── sauceTests.spec.ts
│ ├── api/
│ │ └── apiTests.spec.ts # (optional for future API tests)
├── pages/
│ ├── LoginPage.ts
│ ├── InventoryPage.ts
│ ├── CartPage.ts
│ └── CheckoutPage.ts
├── performance/
│ ├── saucedemo-login.yml
│ ├── report.json
│ └── data/
│ └── users.csv
├── README.md
├── package.json
📬 Contact For questions or contributions, feel free to reach out or open an issue!