You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/contribute/DEV_DOCS.md
+18-12Lines changed: 18 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,19 +61,19 @@ They can be helpful for testing a real-world example and determining if a regres
61
61
62
62
#### 3. Functional tests
63
63
64
-
Augur's command line interface is tested by functional tests implemented with the [Cram framework](https://bitheap.org/cram/).
64
+
Augur's command line interface is tested by functional tests implemented with the [Prysk framework](https://www.prysk.net/).
65
65
These tests complement existing unit tests of individual augur Python functions by running augur commands in the shell and confirming that these commands:
66
66
67
67
1. execute without any errors
68
68
2. produce exactly the expected outputs for the given inputs
69
69
70
70
These tests can reveal bugs resulting from untested internal functions or untested combinations fo internal functions.
71
71
72
-
Over time, we have changed the way we design and organize Augur's Cram tests. You might find older practices in existing tests that haven't been updated yet, but these are the latest guidelines that we've discovered to be helpful.
72
+
Over time, we have changed the way we design and organize Augur's Prysk tests. You might find older practices in existing tests that haven't been updated yet, but these are the latest guidelines that we've discovered to be helpful.
73
73
74
-
1. Keep cram files modular. This makes it easier to see which command is failing.
74
+
1. Keep prysk files modular. This makes it easier to see which command is failing.
75
75
2. Create files in the initial working directory (e.g. `./file.txt` or simply `file.txt`), as it is a temporary working directory unique to the test. Note that the name of the `$TMP` directory is misleading - although it is temporary, it is shared across all tests so you'll have to explicitly remove files at the end of each test to avoid affecting other tests. The initial directory of each test is a unique directory within `$TMP`.
76
-
3. Each directory containing cram tests should have a setup script named `_setup.sh`. Keep all shared setup commands in this file.
76
+
3. Each directory containing prysk tests should have a setup script named `_setup.sh`. Keep all shared setup commands in this file.
77
77
78
78
##### Comparing outputs of augur commands
79
79
@@ -105,34 +105,40 @@ Next, run all augur tests with the following command from the root, top-level of
105
105
./run_tests.sh
106
106
```
107
107
108
+
For faster execution by runnning tests in parallel, add the `-n` argument.
109
+
Using the `-n auto` will use all available cores:
110
+
111
+
```bash
112
+
./run_test.sh -n auto
113
+
```
108
114
For rapid execution of a subset of unit tests (as during test-driven development), the `-k` argument will disable code coverage and functional tests and pass directly to pytest to limit the tests that are run.
109
115
For example, the following command only runs unit tests related to augur mask.
110
116
111
117
```bash
112
118
./run_tests.sh -k test_mask
113
119
```
114
120
115
-
You can run specific integration test(s) with `cram` directly or via our parallel-wrapper which will use all
116
-
available CPUs by default. For instance to run `tests/functional/clades.t` these will both work:
121
+
You can run specific integration test(s) with the `-k` argument as well, via pytest, or prysk directly.
To run cram tests locally and capture test coverage data, you can use this invocation:
135
+
To run prysk tests locally and capture test coverage data, you can use this invocation:
130
136
131
137
```bash
132
-
AUGUR="coverage run --data-file="$PWD/.coverage"$PWD/bin/augur"cram
138
+
AUGUR="coverage run --data-file="$PWD/.coverage"$PWD/bin/augur"prysk
133
139
```
134
140
135
-
You can provide one or more cram test file names to get coverage for just those tests, or omit file names to run the entire cram test suite.
141
+
You can provide one or more prysk test file names to get coverage for just those tests, or omit file names to run the entire prysk test suite.
136
142
137
143
Troubleshooting tip: As tests run on the development code in the augur repository, your environment should not have an existing augur installation that could cause a conflict in pytest.
0 commit comments