Name | Type | Required | Default | Hint |
runner | string | false | The URL or shortname of the runner to use, if it uses a short name we look in your box.json | |
bundles | string | false | The path or list of paths of the spec bundle CFCs to run and test | |
directory | string | false | The directory mapping to test: directory = the path to the directory using dot notation (myapp.testing.specs) | |
recurse | boolean | false | Recurse the directory mapping or not, by default it does | |
reporter | string | false | The type of reporter to use for the results, by default is uses our 'simple' report. You can pass in a core reporter string type or a class path to the reporter to use. | |
labels | string | false | The list of labels that a suite or spec must have in order to execute. | |
excludes | string | false | The list of labels that a suite or spec must not have in order to execute. | |
options | struct | false | Add adhoc URL options to the runner as options:name=value options:name2=value2 | |
testBundles | string | false | A list or array of bundle names that are the ones that will be executed ONLY! | |
testSuites | string | false | A list of suite names that are the ones that will be executed ONLY! | |
testSpecs | string | false | A list of test names that are the ones that will be executed ONLY! | |
outputFile | string | false | We will store the results in this output file as well as presenting it to you. | |
outputFormats | string | false | A list of output reporter to produce using the runner's JSON results only. Available formats are: json,xml,junit,antjunit,simple,dot,doc,min,mintext,doc,text,tap,codexwiki | |
verbose | boolean | false | Display extra details including passing and skipped tests. | |
testboxUseLocal | boolean | false | false | When using outputformats, prefer testbox installation in current working directory over bundled version. |
Executes TestBox runners via HTTP/S. By default, the "testbox.runner" property will be read from your box.json.
If the property is a string, it will be used directly as a URL.
testbox runIf testbox.runner is an array of structs like so:
| "testbox" : {You target a specific URL by name.
| "runner" : [
| {
| "server1" : "http://localhost/tests/runner.cfm",
| "server2" : "/tests/runner.cfm"
| }
| ]
| }
testbox run server1You can also specify the URL manually
testbox run server2
testbox run http://localhost:8080/tests/runner.cfmIf you have a CommandBox server running in the current directory, you can specify a partial URL that starts with /
testbox run /tests/runner.cfmYou can set arbitrary URL options in our box.json like so
package set testbox.options.opt1=value1You can set arbitrary URL options when you run the command like so
package set testbox.options.opt2=value2
testbox run options:opt1=value1 options:opt2=value2You can run your tests and post-produce many reporting results, great for CI purposes
testbox run outputformats=json,antjunit,simple
testbox run outputformats=json,antjunit,simple outputFile=myresults