mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Add tests documentation
This commit is contained in:
parent
9ec9cc5f87
commit
89365b585c
1 changed files with 38 additions and 0 deletions
38
docs/developer/TESTING.md
Normal file
38
docs/developer/TESTING.md
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
# Dangerzone Testing
|
||||||
|
|
||||||
|
Dangerzone has some automated testing under `tests/`.
|
||||||
|
|
||||||
|
The following assumes that you have already setup the development environment.
|
||||||
|
|
||||||
|
## Run tests
|
||||||
|
|
||||||
|
Unit / integration tests are run with:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
poetry run make test
|
||||||
|
```
|
||||||
|
|
||||||
|
## Run large tests
|
||||||
|
|
||||||
|
We also have a larger set of tests that can take a day or more to run, where we evaluate the completeness of Dangerzone conversions.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
poetry run make test-large
|
||||||
|
```
|
||||||
|
|
||||||
|
### Test report generation
|
||||||
|
After running the large tests, a report is stored under `tests/test_docs_large/results/junit/` and it is composed of the JUnit XML file describing the pytest run.
|
||||||
|
|
||||||
|
This report can be analysed for errors. It is obtained by running:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd tests/docs_test_large
|
||||||
|
make report
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want to run the report on some historical test result, you can call:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd tests/docs_test_large
|
||||||
|
python report.py tests/test_docs_large/results/junit/commit_<COMMIT_ID>.junit.xml
|
||||||
|
```
|
Loading…
Reference in a new issue