Skip to main content

bactopia-test

Run nf-test suites for Bactopia components.

Discovers and executes nf-test files across modules, subworkflows, and workflows. Results are classified by status and displayed as a summary table. Per-test logs are saved to a logs/ directory.

Usage

bactopia-test [OPTIONS]

Required Options

OptionTypeDefaultDescription
--bactopia-pathSTRINGDirectory where the Bactopia repository is stored
--test-dataSTRINGDirectory containing bactopia-tests data (sets BACTOPIA_TESTS env). Required unless --cleanup

Cleanup

OptionTypeDefaultDescription
--cleanupBOOLfalseFind and remove all .nf-test/ temp files, then exit (no tests run)
--dry-runBOOLfalseWith --cleanup, list what would be removed without deleting
--keepBOOLfalseKeep .nf-test/ directories and logs after tests pass (useful for debugging)

Test Selection

OptionTypeDefaultDescription
--tierCHOICE (modules, subworkflows, workflows, all)allWhich component tier to test
--includeSTRINGComma-separated list of component names to include
--excludeSTRINGComma-separated list of component names to exclude

Execution Options

OptionTypeDefaultDescription
--profileCHOICE (docker, singularity, conda)dockerNextflow profile to use for tests
--condadirSTRING/home/rpetit3/.bactopia/condaDirectory where Conda environments are stored (NXF_CONDA_CACHEDIR env variable takes precedence)
--singularity_cacheSTRING/home/rpetit3/.bactopia/singularityDirectory where Singularity images are stored (NXF_SINGULARITY_CACHEDIR env variable takes precedence)
--generateBOOLfalseGenerate mode: delete snapshots and run twice to verify reproducibility
--jobsINT64Number of parallel test workers
--fail-fastBOOLfalseStop on the first test failure instead of continuing
--timeoutINT90Per-test timeout in minutes. Each nf-test subprocess is killed after this duration. Set to 0 to disable

Output Options

OptionTypeDefaultDescription
--outdirSTRING.Directory to write the logs/ folder into
--jsonBOOLfalseOutput results as JSON

Additional Options

OptionTypeDefaultDescription
--verboseBOOLfalsePrint debug related text
--silentBOOLfalseOnly critical errors will be printed
--version, -VBOOLfalseShow the version and exit.