boxing-gloveBoxLang CLI Runner

Run your tests directly with BoxLang in the CLI.

TestBox ships with a BoxLang CLI runner for Linux/Mac and Windows. Run your entire test suite — or individual bundles — directly from the terminal with rich, colored output, real-time streaming, dry runs, and detailed performance analysis.

BoxLang CLI Runner output
triangle-exclamation

BoxLang allows you to build web applications, CLI, serverless, Android, and more. You can use this runner to test each environment. However, please note that if you will be testing web apps from the CLI, you will need to install the web support module into the OS runtime.

Web Server Testing

If you want to test your web application from the CLI without a running web server, install the bx-web-support module into the BoxLang OS runtime. This adds web BIFs, components, and a mock HTTP server so you can do full life-cycle testing purely from the CLI.

circle-check

Application.bx Auto-Load

The BoxLang runner automatically attempts to load your Application.bx mappings from the project root before running any specs. This means custom path mappings, datasources, and settings defined in Application.bx are available to your tests without any extra configuration — bringing the CLI experience much closer to a full web server environment.

Script Locations

The runner scripts live in testbox/ inside your TestBox installation:

  • run — Linux / macOS

  • run.bat — Windows

The runner must be executed from the root of your BoxLang project.

Examples

Mac/Linux

Windows


Execution Options

Option
Description
Default

--bundles

Dot-notation list of test bundles to run. Mutually exclusive with --directory.

*

--bundles-pattern

Glob pattern for discovering bundles.

*Spec*.cfc|*Test*.cfc|*Spec*.bx|*Test*.bx

--directory

Dot-notation directory to scan for tests. Mutually exclusive with --bundles.

tests.specs

--recurse

Recurse into sub-directories.

true

--eager-failure

Stop the run on the first failure.

false

--verbose

Show all spec results as they run.

false


🌊 Streaming (Real-Time Output)

The --stream flag activates real-time output, pushing each spec result to the terminal as it completes rather than buffering until the suite finishes.

BoxLang CLI streaming output
BoxLang CLI stream with options
circle-info

Streaming is especially useful in CI environments where you need live progress rather than waiting for the full suite to finish before seeing any output.


🔍 Dry Run & Spec Discovery

The --dry-run flag discovers and reports every spec that would be executed — without actually running any spec closures. Use it to audit coverage, validate label filters, and build test inventories before committing to a full run.

BoxLang CLI dry run output

The output lists every suite and spec that would be executed, along with their labels and any skip reasons.

circle-check

For programmatic dry runs from BoxLang code, see Dry Run & Spec Discovery.


🎯 Output & Focus Options (New in 7.0)

--show-failed-only

Focus your terminal output exclusively on failures and errors, hiding all passing and skipped specs:

--show-passed / --show-skipped

Fine-grained control over which result types appear in the output:

--stacktrace

Control how much stack trace detail is shown for failures and exceptions:

--max-failures

Abort the run after a set number of failures — useful for keeping CI output manageable:

Performance Analysis: --slow-threshold-ms & --top-slowest

Identify slow specs and surface them at the end of the run:

Combining Output Options


Reporting Options

Option
Description
Default

--reporter

The reporter to use.

text

--reportpath

Directory for report files.

/tests/results

--properties-summary

Generate a .properties summary file.

true

--properties-filename

Name for the properties file.

TEST.properties

--write-report

Write the report to a file.

true

--write-json-report

Write a JSON report alongside the main report.

false

--write-visualizer

Write the test visualizer to the report directory.

false


Runner Options

Pass arbitrary options directly through to the selected runner:


Filtering Options

Option
Description

--labels

Only run specs/suites with these labels.

--excludes

Skip specs/suites with these labels.

--filter-bundles

Limit execution to these bundle names.

--filter-suites

Limit execution to these suite names. Direct name matching is supported at any nesting depth.

--filter-specs

Limit execution to these spec names.

circle-info

Suite filtering (--filter-suites) performs direct name matching at any nesting depth — if a suite's name exactly matches the filter value it will always be included regardless of how deeply it is nested.

Last updated

Was this helpful?