BoxLang 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.

The BoxLang CLI runner is a BoxLang-only feature. It runs tests in the BoxLang OS runtime, not inside a web server.
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.
If you are building exclusively a web application, we suggest you use the CommandBox runner which calls your runner via HTTP, or the TestBox RUN IDE for a browser-based experience.
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 / macOSrun.bat— Windows
The runner must be executed from the root of your BoxLang project.
Examples
Mac/Linux
Windows
Execution Options
--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.


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.

The output lists every suite and spec that would be executed, along with their labels and any skip reasons.
Dry run respects all the same filtering options as a normal run: --labels, --bundles, --directory, --filter-suites, --filter-specs, etc.
For programmatic dry runs from BoxLang code, see Dry Run & Spec Discovery.
🎯 Output & Focus Options (New in 7.0)
--show-failed-only
--show-failed-onlyFocus your terminal output exclusively on failures and errors, hiding all passing and skipped specs:
--show-passed / --show-skipped
--show-passed / --show-skippedFine-grained control over which result types appear in the output:
--stacktrace
--stacktraceControl how much stack trace detail is shown for failures and exceptions:
--max-failures
--max-failuresAbort the run after a set number of failures — useful for keeping CI output manageable:
Performance Analysis: --slow-threshold-ms & --top-slowest
--slow-threshold-ms & --top-slowestIdentify slow specs and surface them at the end of the run:
Combining Output Options
Reporting Options
--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
--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.
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?