tests.md 1.09 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Tests
======

*Rex-DRI* comes in with several *tests* that you can perform locally using the commands `make test_backend` and `make test_frontend` once the project is up and running (`make up`).

## Backend testing


### General words

Testing the backend is handled with a combination of `pytest` and `Django` (and `pytest-django` package).

The tests are found in the `backend_app/tests/` folder and they mostly test the custom behaviors that are implemented in the app such as moderation and versioning.

Also, there are tests regarding some custom validation.

Finally, the initial and example loading data scripts are tested.


### Documentation

Some usefull links to get inspired:
- [General information about testing in Django](https://docs.djangoproject.com/fr/2.1/topics/testing/overview/)
- [`pytest` documentation](https://docs.pytest.org/en/latest/)
- [`pytest-django` documentation](https://pytest-django.readthedocs.io/en/latest/)


## Frontend testing

### General words

Testing the frontend is done with `jest`.

### Documentation

- [`jest` documentation](https://jestjs.io/docs/en/getting-started)