This repo contains an example of automation testing written in Cypress v9 and cypress-cucumber-preprocessor package which supports BDD feature files.
The tests are written to verify basic functions of https://juice-shop.guardrails.ai website.
This project follows suggestions from App Actions approach. Refer link: Stop using Page Objects and Start using App Actions
The steps below will take you all the way through setup and running the tests. You will also need to clone the repo and have a basic understanding of Git.
npm install
npm run cypress:open
npm run cypress:run
npm run cypress:smoke-ui
npm run cypress:smoke-api
npm run cypress:regression-ui
npm run cypress:regression-api
You can run visual test with 'percy.io' follows this guide: https://docs.percy.io/docs/cypress
Below is an example of this repo:
export PERCY_TOKEN=a527c5b46ab5d1b6fe507145147a2e9b4bade97a0b6ffa08a720e38ebd520ca0
percy exec -- cypress run
After running your test scenarios, folder 'cypress/cucumber-json' will be generated along with cucumber.json results. Based on these files, you can generate a HTML summary report.
npm run generate-html-report
Open 'index.html' in folder 'reports/cucumber-htmlreport.html'
If you get stuck, here is more help: