Redash uses Cypress for E2E tests, running as the CI build check "frontend-e2e-tests" on each pull request.
Test specs are located in the folder
Running E2E tests locally
If you haven't already, install Redash's Docker services first.
npm run cypress:install
Stop your development environment, if currently running:
Run the full test suite with a detailed report:
npm run cypress
Create, edit and debug tests
If you wish to change, observe and debug tests as they run, we recommend using the Cypress interface.
Start the Cypress server:
npm run cypress start
Seed initial data:
npm run cypress db-seed
Open the Cypress interface:
npm run cypress open
Now you can select and run individual test suites, set breakpoints and logs, utilize Chrome Developer Tools, etc. You can refer to their documentantion.
Any changes to a test will trigger its rerun.
If you make changes to Redash frontend code though, make sure to keep it in sync by running the following command in parallel:
npm run watch
When you're done, stop the server:
npm run cypress stop
This will also reset tests state.
For any question on installations, troubleshooting and best practices, please refer to our forum.