Command line

Ploosh can be executed from the command line using the ploosh command.

Usage

ploosh --connections <path> --cases <path> [options]

Arguments

ArgumentMandatoryDefaultDescription
--connectionsnoPath to the connections YAML file
--casesno./casesPath to the folder containing test case YAML files
--filterno*.ymlGlob pattern to filter test case files
--outputno./outputPath to the output folder for results
--exportnoJSONExport format: JSON, CSV, or TRX
--sparknofalseEnable Spark mode (creates a local SparkSession)
--failurenotrueExit with code 1 if any test fails or errors
--workersno1Number of parallel workers used to process test cases (1 = sequential)
--p_noCustom parameter value (see Custom parameters)

Examples

Basic execution

ploosh --connections "connections.yml" --cases "test_cases"

With export format and parameters

ploosh --connections "connections.yml" --cases "testcases" --export "TRX" --pdbpassword "mypassword"

With filter and custom output

ploosh --connections "connections.yml" --cases "test_cases" --filter "*.yaml" --output "./results"

Disable failure exit code

Useful in CI/CD pipelines where you want to publish results even when tests fail:

ploosh --connections "connections.yml" --cases "test_cases" --failure false

Spark mode

ploosh --connections "connections.yml" --cases "test_cases" --spark true
When --spark true is set and no spark session is provided programmatically, Ploosh creates a local SparkSession. For Fabric or Databricks, use the Python API instead. See Spark mode overview.

Parallel execution

Process test cases concurrently using multiple workers to speed up large test suites:

ploosh --connections "connections.yml" --cases "test_cases" --workers 4
--workers controls how many test cases are processed at the same time. The default value 1 runs test cases sequentially. Increasing the number of workers can significantly reduce total execution time when test cases are I/O-bound (waiting on databases, files, or remote services). Choose a value based on your available resources and the limits of the systems you query.

Python API

When running inside a notebook (Fabric, Databricks), use the execute_cases() function instead:

from ploosh import execute_cases

execute_cases( cases="/path/to/cases", connections="/path/to/connections.yaml", spark_session=spark )

See Python API reference for all parameters.