This repository has been archived by the owner on Mar 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some notes about testing to the documentation
- Loading branch information
Showing
2 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |