testbox.system.runners

Class UnitRunner

railo-context.Component
        extended by testbox.system.runners.BaseRunner
            extended by testbox.system.runners.UnitRunner
Class Attributes:
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
    All Implemented Interfaces:
    IRunner

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

    Property Summary
    type property default serializable required
    any options


    true false
    any testbox


    true false
    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)
         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)
         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
    None

    Constructor Detail

    init

    public init(struct options, any testBox)

    Constructor

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

    Property Detail

    options

    property any options

    Attributes:
    required - false
    serializable - true

    testbox

    property any testbox

    Attributes:
    required - false
    serializable - true

    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)

    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

    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)

    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