A simple ready-to-use Cypress Testing Tool starter kit to integrate with an existing project.
🐳 Docker · 🏷 TypeScript · 🔍 Eslint · 🪄 Makefile
- Clone the repository. 📑
git clone git@github.com:ehasnain/cypress-starter-kit.git
-
Create a directory with a desired name for the e2e tests at the desired location in your project. 🗂
-
Copy the contents of the cloned repository in to the created directory. 📔➡📔
Following files can be ignored:- .github/*
- *.md
-
You are ready to go now ✅
- Start the tests
make test
Note: Chrome Browser is the default browser for running the tests. This can be changed inside the script ./scripts/test-local.sh
You can write your tests inside the director src/tests.
A simple example of extracting a page's components with its actions and selectors can be found inside the directory src/pages
.
The existing example tests from Cypress can be deleted if not needed.
Refer docs.cypress.io for more information about how to write tests in Cypress.
For running the tests on a CI envorinment with docker use the command:
make test-ci
This will run the tests inside a docker container. A JUnit test report is generated at the end of the tests inside the directory test-results/junit/test-results.xml
.
More details of the current changes can be read in CHANGELOG. The CHANGELOG has been automatically generated from the git commits with the help of generate-changelog tool.
Feel free to create PRs, report Bug and Issues or simply write me at ehteshamhasnain@gmail.com.
LinkedIn: @ehteshamhasnain.
Have a happy testing! 😊
cypress-starter-kit is licensed under the terms of the MIT license.