This project contains automated tests using Cypress version 12 for both headless and headful execution. It provides a starting point for setting up and running Cypress tests from scratch.
Before running the tests, ensure that you have the following:
- Node.js: Download and install Node.js
- npm: Included with Node.js installation
- Nagivate to the project directory
cd Cypress_Demo
- Install the dependencies
npm install
To run the tests in headless mode, follow the below steps:
- Execute the below command:
npm run web-headless
- Cypress will display the progress in the terminal and generate test reports in the cypress/reports directory.
- Once the tests have completed, the generated test reports can be found in the cypress/reports directory.
To run the tests in mode, follow the below steps:
- Execute the below command:
npm run web-headful
- In the Test Runner window, click on the test file you want to run, and the tests will start executing in a browser window.
- Cypress will display the progress in the Test Runner window, and you can view the test results in real-time.
The test configuration can be customized in the cypress.config.js
file. You can modify the following properties:
baseUrl
: The base URL for the application under test.reporterOptions
: Configuration options for the Cypress Mochawesome reporter
You can find demo test file in the cypress/e2e
directory. Feel free to modify them or create new test files based on your requirements.