"Saucedemo by Cypress" repository—a collection of automated tests designed to ensure the reliability of the Saucedemo web application. Powered by Cypress and JavaScript, my test suite meticulously examines various facets of the application, allowing you to confidently assess its functionality.
The test cases included in this project are:
- Test Login with Valid Credentials: Validates the login functionality using valid credentials.
- Test Login with Invalid Credentials: Validates the login functionality using invalid credentials.
- Test Add items to cart: Tests the ability to add items to cart.
- Test Remove items from cart: Tests the process of remove items from cart.
- Test Valid Checkout: Tests the checkout process and filling all required data.
You can watch a sample demo of the tests here .
saucedemo.mp4
- Cypress Version: 13.1.0 (stable)
- System Platform: Linux (Ubuntu 22.04)
- Browser: Chrome116(headless)
- Node Version: v18.17.1
To run the tests, follow these steps:
- Clone this repository to your local machine.
- Navigate to the project directory.
- Install Cypress if you haven't already using
npm install cypress
. - Start Cypress by running
npx cypress open
. - In the Cypress test runner, click on the test spec file you want to run (e.g.,
Test_login.cy.js
) to execute the tests.
To configure the test data, update the values in the Fixtures files, typically found in the /cypress/fixtures
directory.
// Example of configuring login credentials in data.json
{
"credentials":{
"username": "standard_user", //add your username
"password": "secret_sauce" //add your password
},
"url":"https://www.saucedemo.com/",
"Personalinfo":{
"Firstname": "Joe",
"Lastname" : "Tom",
"code": 11311
}
}