This project contains end-to-end test automation for the SauceDemo web application using Cypress.
It covers functional, regression, and negative test scenarios including login, inventory management, cart, and checkout workflows.
- Application Under Test (AUT): https://www.saucedemo.com/
- Framework: Cypress (JavaScript)
- Modules Covered:
- Login
- Inventory
- Cart
- Checkout
- Menu (Side Navigation)
- Negative & Edge Cases
- UI/UX Validation
saucedemo-cypress/
│
├── cypress/
│ ├── e2e/ # Test specs (by module)
│ ├── fixtures/ # Test data (e.g., credentials.json)
│ ├── support/ # Custom commands & Page Objects
│
├── node\_modules/ # Dependencies
├── cypress.config.js # Cypress configuration
├── package.json # Project dependencies & scripts
└── README.md # Project documentation
-
Clone this repository:
git clone https://github.com/siddhugurubhetti8483/saucedemo-cypress.git cd saucedemo-cypress
-
Create Json Package
npm init -y
-
Install Cypress for fresh project:
npm install cypress --save-dev
-
Install dependencies after clone:
npm install cypress --save-dev
-
Run tests in headed mode:
npx cypress open
-
Run tests in headless mode:
npx cypress run
- Valid login with standard_user
- Invalid login (wrong username/password)
- Locked_out_user login
- Empty username/password validation
- Case sensitivity checks
- Verify product list (6 items)
- Product details: name, price, image
- Sorting functionality (A-Z, Z-A, Price low-high, high-low)
- Add to Cart / Remove functionality
- Cart badge updates
- Navigate to product detail page
- Verify added products
- Remove products
- Continue shopping navigation
- Checkout button navigation
- Step One: form validations
- Step Two: overview validations (items, totals, tax, grand total)
- Order completion & confirmation
- Open/close menu
- Logout functionality
- Reset App State (cart reset)
- Checkout with empty cart
- Direct URL access without login
- Session persistence after refresh
- Access after logout (back button behavior)
- Header, footer, and logo visibility
- Button states and alignment
- Responsive checks (different viewports)
- Integration with CI/CD (GitHub Actions, Jenkins)
- Test reports with Allure/Mochawesome
- Cross-browser testing
- Parallel execution support
- Siddharam Gurubhetti
- Contact: [email protected]
- GitHub: siddhugurubhetti8483