For the complete documentation index, see llms.txt. This page is also available as Markdown.

Streaming Runner

Push test results to clients in real time via Server-Sent Events as each spec completes.

TestBox 7 introduces a brand-new StreamingRunner that pushes test results to the client as each spec completes via Server-Sent Events (SSE). You no longer have to wait for the entire suite to finish before seeing results — each spec result is streamed in real time. This opens up powerful workflows for CI pipelines, large test suites, and browser-based IDEs where immediate feedback is critical.

Streaming runner real-time output
Spec results arrive in the terminal as each test completes

Where Streaming Is Used

The StreamingRunner is the engine behind two separate streaming experiences:

Consumer
How to activate

TestBox RUN IDE

Open bx/tests/index.bxm in your browser — streaming is always on

CommandBox CLI

testbox run --streaming

BoxLang CLI Runner

./testbox/run --stream


Programmatic Usage

testbox.system.runners.StreamingRunner can be wired into any SSE-capable HTTP endpoint:

BoxLang Example

In a BoxLang handler or script:


CLI Streaming

CommandBox (testbox run --streaming)

CommandBox streaming results

BoxLang CLI (./testbox/run --stream)

BoxLang CLI streaming output

See the BoxLang CLI Runner for the full set of output-control options (--show-failed-only, --stacktrace, etc.) that work alongside --stream.


SSE Event Format

Each spec result is emitted as an SSE event with the following structure:

Event types:

Event
Description

bundle-start

A new bundle begins execution

bundle-end

A bundle has finished; includes bundle-level stats

suite-start

A suite begins

suite-end

A suite completes

spec

A single spec result (pass/fail/error/skipped)

done

Full run complete; includes aggregate stats

The SSE format is consumed natively by the TestBox RUN IDE and by the streaming renderers in both CLI runners. You can also consume it from any SSE-capable HTTP client.

Last updated

Was this helpful?