Skip to content

Commit f2d5abf

Browse files
committed
Include instructions for running unit tests
1 parent 31428c4 commit f2d5abf

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

docs/epidata_development.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,29 @@ docker run --rm -p 10080:80 \
106106
delphi_web_epidata
107107
```
108108

109-
## manual
109+
## unit tests
110+
111+
Once the server containers are running, you can run unit tests.
112+
113+
First, build the `delphi_python` image per the
114+
[backend development guide](https://github.com/cmu-delphi/operations/blob/master/docs/backend_development.md#creating-an-image).
115+
Your test sources will live in, and be executed from within, this image.
116+
117+
Then run the test container:
118+
119+
```bash
120+
docker run --rm --network delphi-net delphi_python \
121+
python3 -m undefx.py3tester.py3tester \
122+
repos/delphi/delphi-epidata/tests
123+
```
124+
125+
The final line of output should be similar to the following:
126+
127+
```
128+
All 48 tests passed! 68% (490/711) coverage.
129+
```
130+
131+
## manual tests
110132

111133
You can test your changes manually by:
112134

@@ -195,7 +217,7 @@ Here's a full example based on the `fluview` endpoint:
195217
libraries are better candidates for automated integration tests (and unit
196218
tests, in the case of the python client) than one-off manual tests.
197219

198-
## integration
220+
## integration tests
199221

200222
Writing an integration test is outside of the scope of this document. However,
201223
a number of existing integration tests exist and can be used as a good starting

0 commit comments

Comments
 (0)