https://github.com/emanmhmd/saucedemo-by-cypress
Sample demo of testing web-app using Cypress
https://github.com/emanmhmd/saucedemo-by-cypress
assertions cypress cypress-io javascript nodejs npm test-automation testing testing-tools web-testing webtesting
Last synced: 25 days ago
JSON representation
Sample demo of testing web-app using Cypress
- Host: GitHub
- URL: https://github.com/emanmhmd/saucedemo-by-cypress
- Owner: emanmhmd
- Created: 2023-09-07T09:12:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-16T09:11:11.000Z (over 1 year ago)
- Last Synced: 2025-09-07T15:44:47.331Z (9 months ago)
- Topics: assertions, cypress, cypress-io, javascript, nodejs, npm, test-automation, testing, testing-tools, web-testing, webtesting
- Language: JavaScript
- Homepage:
- Size: 8.04 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Saucedemo web tesing by Cypress
"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.
## Test Cases
The test cases included in this project are:
1. **Test Login with Valid Credentials**: Validates the login functionality using valid credentials.
2. **Test Login with Invalid Credentials**: Validates the login functionality using invalid credentials.
3. **Test Add items to cart**: Tests the ability to add items to cart.
4. **Test Remove items from cart**: Tests the process of remove items from cart.
5. **Test Valid Checkout**: Tests the checkout process and filling all required data.
## Demo
You can watch a sample demo of the tests here .
https://github.com/emanmhmd/saucedemo-by-cypress/assets/63087099/645ac901-18fe-4a8c-a90b-e25541bc2851
## Environment
- **Cypress Version**: 13.1.0 (stable)
- **System Platform**: Linux (Ubuntu 22.04)
- **Browser**: Chrome116(headless)
- **Node Version**: v18.17.1
## Getting Started
To run the tests, follow these steps:
1. Clone this repository to your local machine.
2. Navigate to the project directory.
3. Install Cypress if you haven't already using `npm install cypress`.
4. Start Cypress by running `npx cypress open`.
5. 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.
## Configuration
To configure the test data, update the values in the Fixtures files, typically found in the `/cypress/fixtures` directory.
```JSON
// 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
}
}