This is my look at the Cypress testing suite. It is very simple, but dockerized. This is living example based on Condiut app(React)
This suite will not automatically record tests but it will make screenshots when assertions would fail. Moreover, folders screenshots
and videos
are git ignored.
Manually added data-cy
params to the elements used in test-cases to provide scalability.
The only requirement for this project is to have Node.js version 14 installed on your machine.
npm install
- to install dateformat librarynpm start
- to start Conduit app locallynpm run cy:open
- opens Cypress UInpm run cy:test
- runs tests in terminalnpm run cy:test:record
- runs test in terminal and creates the report at Cypress Dashboard service
docker build -t my_cypress_image:1.0.0 .
- to create the docker imagedocker run -it -v $PWD:/My-Cypress-Suite -t my_cypress_image:1.0.0
- to run the node appdocker ps
- to get the docker iddocker exec -it <container id> /bin/bash
- it will open the terminal inside the docker, now you could runnpm run cy:test:record