
No need to start with the seed – plant the sapling!
Get it? Because “Cypress” is a tree… 🤓
On my last project we chose Cypress to automate our E2E tests. During a year and a half we constantly tweaked and improved our test repository. We added more functionary on top of Cypress (using plugins) and automated everyday tasks (e.g. dependencies, Docker, static code analysis).
I’ve extracted the best bits of our test repo into this “cypress template repository”, which I decided to call Cypress Sapling.
Thanks to this repository, you no longer have to start from scratch if you want to create your own Cypress testing repository. You will get all this functionality for free:
- Code linting, via ESLint
- Code formatting, via Prettier
- Conventional commits, via git-cz
- HTML test results, via mochawesome
- JUnit test results (for CI integration), via mocha-junit-reporter
- Intuitive test commands, via Testing Library
- Filter tests to run based on tags, via cypress-select-tests
- Auto retry failed tests, via cypress-plugin-retries
- Wait the test execution until a condition is true, via cypress-wait-until
- Docker commands to build an image ready to run tests anywhere
Even if you already have your own Cypress repository, you can have a look at this template to see what you might be missing and how you could implement it on your repository.
P.S: If you want to learn more about the Cypress “ready-to-run” Docker image, I wrote a dedicated post about it.