Skip to content

Latest commit

 

History

History
32 lines (19 loc) · 1.18 KB

testing.md

File metadata and controls

32 lines (19 loc) · 1.18 KB

Testing

We use Cypress for testing.

The testing files are placed in cypress/ folder and cypress config

We have integration tests in cypress/e2e/. For these tests, we stub api calls. The api therefore doesn't have to be set up before running these tests

Run tests

Interactive

To run tests interactively,

  1. BROWSER=none yarn start - run the app on default port 3000 without any specific api settings If other app is running on port 3000, you'll have to stop it first
  2. yarn cypress open
  3. Select e2e tests from the available options
  4. Select your preferred browser
  5. Select a test file to run from list

Automatic

To run tests automatically, run yarn e2e. Be careful, this command will kill all your node processes at the end (this should be fixed, but currently we don't know any better...)

Continuous integration

We also have CI1 set up with github workflows. It runs tests on github after every push and merge to main branch there.

We haven't figured out how to run tests against live api without stubbing, yet.

Footnotes

  1. continuous integration