Functional testing with Cypress
Cypress is a modern open-source end-to-end testing framework which provides good developer experience. You can check how we leverage Cypress in starter to perform functional testing. Its goal is to check if the end user can complete all the flows and actions available on the website.
Detailed information how to use Cypress can be found in the official docs:
We recommend also reading about best practices in Cypress:
Using Cypress locally
Cypress tests are located in
To run them, you need to start your CMS instance first from
Then update test content located in
/tests/content folder execute the following script:
Finally run the commands below:
This will launch the Cypress interactive GUI. It is the most convenient way to write and debug your tests during development.
Using Cypress on CI server
To run E2E tests on CI server, you need to launch Cypress in headless mode. It can be done by using this command from the root directory:
.github/workflows/ci.yml you can check how we have configured running Cypress tests in Github Actions as a part of pull request validation.