> For the complete documentation index, see [llms.txt](https://testbox.ortusbooks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://testbox.ortusbooks.com/getting-started/running-tests/bundle-s-runner.md).

# Bundle(s) Runner

This is more of an approach than an actual specifc runner. This approach shows you that you can create a script file in BoxLang (`bxs`) or in CFML (`cfs|cfm`) that can in turn execute any test bundle(s) with many many runnable configurations.

### BoxLang

The BoxLang language allows you to run your scripts via the CLI or the browser if you have a web server attached to your project.

{% code title="run.bxs" %}

```cfscript
// Test the BDD Bundle
r = new testbox.system.TestBox( "tests.specs.BDDTest" )
println( r.run() );

// Test the bundle with ONLY the passed specs
r = new testbox.system.TestBox( "tests.specs.BDDTest" )
println( r.run( testSpecs="OnlyThis,AndThis,AndThis" ) )

// Test the bundle with ONLY the passed suites
r = new testbox.system.TestBox( "tests.specs.BDDTest" )
println( r.run( testSuites="Custom Matchers,A Spec" ) )

// Test the passed array of bundles
r = new testbox.system.TestBox( [ "tests.specs.BDDTest", "tests.specs.BDD2Test" ] )
println( r.run() )

// Test with labels and the minimal reporter
r = new testbox.system.TestBox( bundles: "tests.specs.BDDTest", labels="linux" )
println( r.run( reporter: "mintext" ) )
```

{% endcode %}

If you want to run it in the CLI, then just use:

```bash
boxlang run.bxs
```

If you want to run it via the web server, place it in your `/tests/` folder and run it

```
http://localhost/tests/run.bxs
```

### CFML

CFML engines only allow you to run tests via the browser. So create your script, place it in your web accessible `/tests` folder and run it.

{% code title="run.cfm" %}

```cfscript
<cfscript>
	// Test the BDD Bundle
	r = new testbox.system.TestBox( "tests.specs.BDDTest" )
	writeOutput( r.run() );
	
	// Test the bundle with ONLY the passed specs
	r = new testbox.system.TestBox( "tests.specs.BDDTest" )
	writeOutput( r.run( testSpecs="OnlyThis,AndThis,AndThis" ) )
	
	// Test the bundle with ONLY the passed suites
	r = new testbox.system.TestBox( "tests.specs.BDDTest" )
	writeOutput( r.run( testSuites="Custom Matchers,A Spec" ) )
	
	// Test the passed array of bundles
	r = new testbox.system.TestBox( [ "tests.specs.BDDTest", "tests.specs.BDD2Test" ] )
	writeOutput( r.run() )
	
	// Test with labels and the minimal reporter
	r = new testbox.system.TestBox( bundles: "tests.specs.BDDTest", labels="linux" )
	writeOutput( r.run( reporter: "mintext" ) )
</cfscript>
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://testbox.ortusbooks.com/getting-started/running-tests/bundle-s-runner.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
