Running Tests
Test All Things!
Custom Runners
run()
run() Last updated
Was this helpful?
Test All Things!
run() Last updated
Was this helpful?
Was this helpful?
// Run tests and produce reporter results
testbox.run()
// Run tests and get raw testbox.system.TestResults object
testbox.runRaw()
// Run tests and produce reporter results from SOAP, REST, HTTP
testbox.runRemote()
// Run via Spec URL
http://localhost/tests/spec.cfc?method=runRemote
// Via CommandBox
testbox run/**
* Run me some testing goodness, this can use the constructed object variables or the ones
* you can send right here.
*
* @bundles The path, list of paths or array of paths of the spec bundle classes to run and test
* @directory The directory to test which can be a simple mapping path or a struct with the following options: [ mapping = the path to the directory using dot notation (myapp.testing.specs), recurse = boolean, filter = closure that receives the path of the class found, it must return true to process or false to continue process ]
* @reporter 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 an instance of a testbox.system.reports.IReporter. You can also pass a struct if the reporter requires options: {type="", options={}}
* @labels The list or array of labels that a suite or spec must have in order to execute.
* @excludes The list or array of labels that a suite or spec must not have in order to execute.
* @options A structure of configuration options that are optionally used to configure a runner.
* @testBundles A list or array of bundle names that are the ones that will be executed ONLY!
* @testSuites A list or array of suite names that are the ones that will be executed ONLY!
* @testSpecs A list or array of test names that are the ones that will be executed ONLY!
* @callbacks A struct of listener callbacks or a class with callbacks for listening to progress of the testing: onBundleStart,onBundleEnd,onSuiteStart,onSuiteEnd,onSpecStart,onSpecEnd
* @eagerFailure If this boolean is set to true, then execution of more bundle tests will stop once the first failure/error is detected. By default this is false.
*/
any function run(
any bundles,
any directory,
any reporter,
any labels,
any excludes,
struct options,
any testBundles = [],
any testSuites = [],
any testSpecs = [],
any callbacks = {},
boolean eagerFailure = false
)