Skip to content

Tests Guidelines

This section describes how to run the test suite of the VAST Pipeline.

General Tests

Test are found under the folder tests. Have a look and feel free to include new tests.

Run the tests with the following:

To run all tests:

(pipeline_env)$ ./manage.py test

To run one test file or class, use:

(pipeline_env)$ ./manage.py test <path.to.test>

for example, to run the test class CheckRunConfigValidationTest located in test_pipelineconfig.py, use:

(pipeline_env)$ ./manage.py test vast_pipeline.tests.test_pipelineconfig.CheckRunConfigValidationTest

to run the tests located in test_webserver.py, use:

(pipeline_env)$ ./manage.py test vast_pipeline.tests.test_webserver

Regression Tests

Regression tests located in test_regression require the use of the VAST_2118-06A field test dataset which is not a part of the repository. This data is downloadable from cloudstor. You can use the script located in tests/regression-data/:

cd vast_pipeline/tests/regression-data/ && ./download.sh

to download the VAST_2118-06A field test dataset into the regression-data folder. Or manually by clicking the button below:

Download data for test

and place the VAST_2118-06A field test dataset into the regression-data folder. These regression tests are skipped if the dataset is not present.

All tests should be run before pushing to master. Running all the tests takes a few minutes, so it is not recommended to run them for every change.

If you have made a minor change and would like to only run unit tests, skipping regression tests, use:

(pipeline_env)$ ./manage.py test vast_pipeline.tests.test_pipeline

Note

If changes are made to the default config keys, these changes need to be propagated to the test config files.


Last update: April 23, 2021
Created: January 19, 2021