A sample framework created using cypress, bdd, typescript and docker, reports are generated using various report styles like mochawesome and allure-report.
- Node version 12 or above
- Visual Studio Code
You know setting up framework is very quick!
- npm install
- go to cypress.json file
- set baseurl
- Go to project root,
npx cypress open
ornpm run cy:open
- click specific feature or run all features
npm run e2e_mochawesome
# for a full run with mochawesome reportsnpm run e2e_allure
# for a full run with allure-reportsnpm run cy:run:record
# for a full run and to upload testresults to cypress dashboard
and refer to more other npm scripts added in package.json
-
Mochawesome reports: After execution of command
npm run e2e_mochawesome
, reports will be generated inmochawesome-report
folder and openoutput.html
for html reports -
Allure reports: After execution of command
npm run e2e_allure
, allure reports will be shown via webserver
-
Download and install Docker
-
For Windows: https://docs.docker.com/desktop/windows/
-
Go to project root and run command
docker build -t cypress .
- This is to setup cypress env(cypress folder under e2e directory) by using
docker-compose.yml
andcy-open.yml
files
cd e2e
docker-compose -f docker-compose.yml -f cy-open.yml up --exit-code-from cypress