Automated UI tests for the SauceDemo application using Cypress and Playwright, with CI pipeline integration for continuous test execution and reporting.
Service | Status |
---|---|
GitHub | |
CircleCI | |
SonarCloud |
- Project Overview
- Installation
- Running Tests
- Project Structure
- Code Quality: ESLint & Prettier
- Continuous Integration
- OWASP ZAP Security Scans
- Contributing
- License
This repository contains end-to-end UI tests for SauceDemo. The tests are implemented using:
- Cypress — for fast and reliable browser testing.
Clone the repo and install dependencies:
git clone https://github.com/BrandonNaidoo/saucedemo-ui-tests.git
cd saucedemo-ui-tests
npm install
- Run Cypress tests in headless mode (default for CI):
npm run test:cypress
- Open Cypress Test Runner (headed mode for local development):
npm run test:open
- Run Playwright tests in headed mode (default for local dev):
npm run test:playwright
- Run Playwright tests in headless mode (recommended for CI):
npm run test:playwright:ci
saucedemo-ui-tests/
├── .circleci/ # CircleCI configuration
├── .github/ # GitHub workflow configuration
├── .vscode/ # Editor settings (e.g., format-on-save)
├── cypress/ # Cypress tests and support files
├── playwright.config.ts # Playwright configuration
├── pages/ # Page Object Model (POM) classes
├── enums/ # User roles or domain enums
├── constants/ # Reusable test strings or error messages
├── cypress.config.ts # Cypress configuration
├── eslint.config.mjs # ESLint rules (modern format)
├── package.json # Project metadata and scripts
├── playwright.config.ts # Playwright configuration
├── README.md # This file
├── sonar-project.properties # SonarCloud project configuration
├── tsconfig.json # TypeScript configuration
This project uses ESLint and Prettier to maintain consistent code style and catch issues.
Make sure to install the corresponding VS Code extensions for automatic linting and formatting on save.
- GitHub Actions configured to run Cypress tests, Playwright tests, SonarCloud scan and Owasp Zap scan on push, pull request, and scheduled monthly
- Circle CI configured to run Cypress tests and Playwright tests on push, pull request, and scheduled monthly
OWASP ZAP is integrated into the GitHub Actions workflow to perform automated security scans against saucedemo.com. Results are generated with each pipeline run to help identify common web vulnerabilities.
At this time, this project is not open to external contributions.
Please feel free to fork the repository for personal use or experimentation, but I am not currently accepting pull requests or feature suggestions.
This project is licensed under the MIT License.
Thanks to Sauce Labs for providing a publicly available UI demo site.