This project is a simple example of how to use Cypress for automation testing. The project is comprehensive application where i try to cover all things that we need to during Automation testing.
- Clone the repository
- Run
npm install
to install the dependencies - Run
npm run cypress:open
to open the Cypress Test Runner - Click on the test file to run the tests
- Run
npm run cypress:run
to run the tests in headless mode - Run
npm run cypress:report
to generate the mochawesome report - Run
npm run cypress:report:open
to open the mochawesome report - Run
npm run cypress:report:merge
to merge the mochawesome reports - Run
npm run cypress:report:generate
to generate the mochawesome report after merging the reports - Run
npm run cypress:report:open:merged
to open the merged mochawesome report - Run
npm run cypress:report:clean
to clean the mochawesome reports
- Login Test
- Different type to API test (simple auth, token auth, auth2 etc)
- UI Test
- Performance Test
- End-to-End Test
- Jenkins Integration
- Work with POM (Page Object Model)
- Work with fixtures
- fixtures: Contains the test data
- e2e: Contains the test files
- support: Contains the custom commands and other support files
- Create an account on the Cypress Dashboard
- Run
npm run cypress:open
to open the Cypress Test Runner - Click on the test file to run the tests
- Click on the Dashboard link to view the test results
- Run
npm run cypress:run
to run the tests in headless mode
- Create an account on the CI service (e.g. Jenkins)
- Create a new job
- Add the following commands to the job:
npm install
npm run cypress:run
- Build the job
- View the test results