TestBox 2.4.0

testbox.system.runners
Class UnitRunner

railo-context.Component
        extended by testbox.system.runners.BaseRunner
            extended by testbox.system.runners.UnitRunner
All Implemented Interfaces:
IRunner

public class UnitRunner
extends BaseRunner

Copyright Since 2005 TestBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- This TestBox runner is used to run and report on xUnit style test suites.


Constructor Summary
init(struct options, any testBox)
          Constructor
 
Method Summary
 string getOptions()
 string getTestbox()
private array getTestMethods(any target, any testResults)
          Retrieve the testing methods/specs from a given target
private array getTestSuites(any target, any targetMD, any testResults)
          Get all the test suites in the passed in bundle
 any run(any target, TestResult testResults, any callbacks)
          Execute a BDD test on the incoming target and store the results in the incoming test results
 any setOptions(any options)
 any setTestbox(any testbox)
private any testSuite(any target, any suite, any testResults, any bundleStats, any callbacks='[runtime expression]')
          Test the incoming suite definition
 
Methods inherited from class testbox.system.runners.BaseRunner
canRunBundle, canRunLabel, canRunSpec, canRunSuite, getMethodAnnotation, isValidTestMethod
 
Methods inherited from class railo-context.Component
 

Constructor Detail

init

public init(struct options, any testBox)
Constructor

Parameters:
options - The options for this runner
testBox - The TestBox class reference
Method Detail

getOptions

public string getOptions()


getTestbox

public string getTestbox()


getTestMethods

private array getTestMethods(any target, any testResults)
Retrieve the testing methods/specs from a given target.

Parameters:
target - The target to get the methods from
testResults

getTestSuites

private array getTestSuites(any target, any targetMD, any testResults)
Get all the test suites in the passed in bundle

Parameters:
target - The target to get the suites from
targetMD - The metdata of the target
testResults - The test results object

run

public any run(any target, TestResult testResults, any callbacks)
Execute a BDD test on the incoming target and store the results in the incoming test results

Specified by:
run in interface IRunner
Parameters:
target - The target bundle CFC to test
testResults - The test results object to keep track of results for this test case
callbacks - A struct of listener callbacks or a CFC with callbacks for listening to progress of the testing: onBundleStart,onBundleEnd,onSuiteStart,onSuiteEnd,onSpecStart,onSpecEnd

setOptions

public any setOptions(any options)

Parameters:
options

setTestbox

public any setTestbox(any testbox)

Parameters:
testbox

testSuite

private any testSuite(any target, any suite, any testResults, any bundleStats, any callbacks='[runtime expression]')
Test the incoming suite definition

Parameters:
target - The target bundle CFC
suite
testResults - The testing results object
bundleStats - The bundle stats this suite belongs to
callbacks - The CFC or struct of callback listener methods

TestBox 2.4.0