This repository contains automated tests for the serverest application, developed using Cypress and JavaScript. The tests are designed to validate the functionality and performance of various endpoints within the serverest API.
Table of Contents
• Overview
Overview
The serverest Automation Repository aims to ensure the reliability and robustness of the serverest API through comprehensive automated testing. The tests cover a range of scenarios, including user authentication, product management, and order processing.
Prerequisites
Before running the tests, ensure you have the following installed:
• Node.js (version 14 or higher)
• npm (Node Package Manager)
Installation
- Clone the repository:
git clone https://github.com/epeles/serverest-tests.gitcd serverest-tests- Install the necessary dependencies:
npm installRunning Tests
To execute the tests, use the following command:
npx cypress openThis command will launch the Cypress Test Runner, allowing you to select and run individual tests or all tests in the suite.
To run the tests in headless mode, use the following command:
npx cypress runGitHub Actions Pipeline
This repository includes a GitHub Actions pipeline to run Cypress tests automatically in Chrome and Firefox.
Cypress Cloud Reports
After the pipeline execution on GitHub Actions, the test reports will be available on Cypress Cloud. You can access detailed test results, including screenshots and videos of the test runs, on the Cypress Dashboard: https://cloud.cypress.io/projects/fvtch4/
Test Cases
The repository includes the following test cases:
-
Login Tests: Validate user authentication, including creating a new user, logging in with valid/invalid credentials, and handling missing username errors.
-
Search Tests: Test product search functionality, ensuring correct results display, handling no results scenarios, and adding items to the cart.
-
API Tests: Interact with the backend API to create users, authenticate, and manage shopping carts, validating successful operations and error handling.
