Ocelot-Social/documentation/workflow/testing/integration-testing.md
2019-04-04 00:40:07 +02:00

1.1 KiB

Integration Testing

Install Cypress

Before we start, first install Cypress on your dev machine.

$ yarn global add cypress

Run Tests

To run the tests, open the directory of our Nitro Frontend in your console and run following command:

$ cypress run

Console output after running cypress test

After the test run, you will get also some video footage of the test run which you can then analyse in more detail.

Open Interactive Test Console

If you are like me, you might want to see some visual output. The interactive cypress environment also helps at debugging your tests, you can even time travel between individual steps and see the exact state of the app.

Interactive Cypress Environment

Write some Tests

Go the the Cypress documentation for further information on how to write tests:
https://docs.cypress.io/guides/getting-started/writing-your-first-test.html#Write-a-simple-test