๐ŸงชTesting Strategy

How we test our front end

When a PR is submitted, a series of tests will be run with Github actions. It is fine to just submit your PR and let the tests run on Github. However, if the tests fail, you may need to run the tests locally to investigate what's going on, then either fix the tests, or fix your code.

Running Cypress tests locally

Cypress is a frontend test framework that is used on part of Portal.

To run Cypress tests locally, you need two shell windows.

Shell #1

The following will run the portal/game on local server.

./run

Shell #2

This will run the Cypress tests in the terminal.

yarn run cypress run

If you want to view the tests as they run using Cypress' test runner window, you can run:

yarn run cypress open

Running Selenium tests locally

Selenium is a frontend test framework that is used in Rapid Router and in Portal. We aim to gradually migrate Selenium tests to Cypress.

To run Selenium tests you need to install chromedriver. Please check here on how to install for your OS.

Similar with Cypress, it will launch a browser windows and you should be able to see a series of frontend actions.

Last updated