Skip to content
This repository has been archived by the owner on Mar 10, 2023. It is now read-only.

Commit

Permalink
Add some notes about testing to the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
talavis committed Jul 5, 2021
1 parent b42bfca commit 6538745
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/source/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ Development
.. toctree::
:maxdepth: 4

development.quick_environment.rst
development.quick_environment.md
development.testing.md
modules
29 changes: 29 additions & 0 deletions docs/source/development.testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Testing

All tests require an active setup of the Data Tracker via docker-compose and test data in the database (See [System for development](development.quick_environment.md))

Most tests are not deterministic and do not restore the state of the db afterwards.

## Backend

The tests are found in `backend/tests`. Use the same `venv` used to add data to the database.

From the root of the repository:

```
PYTHONPATH=backend pytest backend
```

## Frontend

Frontend testing is implemented using the end-to-end testing solution Nightwatch.

Go to `test/nighwatch` and run `yarn install` to install the required packages.

Nightwatch can use multiple different browsers, but the tests have only been confirmed to work with Chrome.

To run the tests (in the `test/nighwatch` folder):

```
npx nightwatch collection.js --env chrome
```

0 comments on commit 6538745

Please sign in to comment.