nf-test plugin with utility functions for pipeline-level snapshot testing.
sanitizeOutput()- clean process outputs for stable snapshotsfilterNextflowOutput()- remove variable content from stdout/stderrgetAllFilesFromPath()- list files from local or S3 pathsremoveNextflowVersion()- strip Nextflow version from YAML filesnfcoreInstall()- install nf-core modules for testingcurlAndExtract()- download and extract archives in test setup
Full documentation at nf-co.re/nft-utils.
Requires Nextflow, nf-test, and Maven.
# Install conda environment
mamba env create -f environment.yml
mamba activate env_nft_utils
# Compile the package
mvn -B clean verify
# Run all tests
nf-test test --plugins target/nft-utils-*.jar --verbose --debug tests/
# Run a single test and update snapshots
nf-test test --plugins target/nft-utils-*.jar --update-snapshot tests/sanitizeOutput/
# Test with no plugins installed
nf-test test --plugins target/nft-utils-*.jar --config tests_noplugins/nf-test_noplugins.config tests_noplugins/sanitizeOutput/nft-utils was created by the nf-core community.