This project demonstrates automated API testing using Cypress, featuring tests for the ReqRes.in demo API and Sauce Labs demo site.
- API Testing Suite for ReqRes.in
- User management endpoints
- Resource management endpoints
- Error handling scenarios
- Delayed response testing
- UI Testing Suite for Sauce Labs Demo
- Login functionality
- Error handling
- Page Object Model implementation
- Node.js (v12 or higher)
- npm (v6 or higher)
- Clone the repository
- Install dependencies:
npm install
- Create
cypress.env.jsonfile in the project root:{ "STANDARD_USER": "standard_user", "LOCKED_OUT_USER": "locked_out_user", "PASSWORD": "secret_sauce", "API_KEY": "reqres-free-v1" }
npm run cypress:runnpm run cypress:opennpm run cypress:run --spec "cypress/e2e/reqres-api.cy.js"- List users with pagination
- Get single user details
- List resources
- Get single resource
- Handle user not found
- Test delayed responses
- Successful login
- Locked out user error
- Page Object Pattern
- Custom Commands
- Environment Variables
- API Headers Management
- Consistent Wait Strategy
- Error Handling
- Detailed Assertions
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
This project is licensed under the MIT License.