Running tests

How to run component and integration tests.

Fetch the test data

The input data that is needed to run the tests will need to be downloaded from the openpipelines Amazon AWS s3 bucket first. To do so, the download/sync_test_resource component can be used, which will download the data to the correct location (resources_test) by default.

viash run src/download/sync_test_resources/config.vsh.yaml

Run component tests

To build and run tests for individual component that you are working on, use viash test with the config.vsh.yaml of the component you would like to test. For example:

viash test src/convert/from_10xh5_to_h5mu/config.vsh.yaml

Keep in mind that when no platform is passed to viash test, it will use the first platform that is specified in the config, which is docker for most of the components in openpipelines. Use -p native for example if you do not want to use docker.

It is also possible to execute the tests for all components in each namespace using:

viash ns test --parallel -q convert

Run integration tests

Individual integration tests can be run by using the integration_test.sh scripts for a pipeline, located next to the main.nf in the src/workflows folder.

src/workflows/ingestion/cellranger_demux/integration_test.sh