coldbox.system.testing

Class TestResult

WEB-INF.cftags.component
        extended by coldbox.system.testing.TestResult
Class Attributes:
  • accessors : true
  •  

    ******************************************************************************* Copyright 2005-2009 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.coldbox.org | www.luismajano.com | www.ortussolutions.com ******************************************************************************* This object manages the results of testing with TestBox

    Property Summary
    type property default serializable required
    struct bundleStats


    true false
    numeric endTime


    true false
    array labels


    true false
    numeric startTime


    true false
    array testBundles


    true false
    array testSpecs


    true false
    array testSuites


    true false
    numeric totalBundles


    true false
    numeric totalDuration


    true false
    numeric totalError


    true false
    numeric totalFail


    true false
    numeric totalPass


    true false
    numeric totalSkipped


    true false
    numeric totalSpecs


    true false
    numeric totalSuites


    true false
    Constructor Summary
    init([numeric bundleCount='0'], [array labels='[runtime expression]'], [array testBundles='[runtime expression]'], [array testSuites='[runtime expression]'], [array testSpecs='[runtime expression]'])
          Constructor.
    Method Summary
    numeric GETENDTIME()
    array GETLABELS()
    numeric GETSTARTTIME()
    array GETTESTBUNDLES()
    array GETTESTSPECS()
    array GETTESTSUITES()
    numeric GETTOTALBUNDLES()
    numeric GETTOTALDURATION()
    numeric GETTOTALERROR()
    numeric GETTOTALFAIL()
    numeric GETTOTALPASS()
    numeric GETTOTALSKIPPED()
    numeric GETTOTALSPECS()
    numeric GETTOTALSUITES()
    TestResult SETBUNDLESTATS(struct bundleStats)
    TestResult SETENDTIME(numeric endTime)
    TestResult SETLABELS(array labels)
    TestResult SETSTARTTIME(numeric startTime)
    TestResult SETTESTBUNDLES(array testBundles)
    TestResult SETTESTSPECS(array testSpecs)
    TestResult SETTESTSUITES(array testSuites)
    TestResult SETTOTALBUNDLES(numeric totalBundles)
    TestResult SETTOTALDURATION(numeric totalDuration)
    TestResult SETTOTALERROR(numeric totalError)
    TestResult SETTOTALFAIL(numeric totalFail)
    TestResult SETTOTALPASS(numeric totalPass)
    TestResult SETTOTALSKIPPED(numeric totalSkipped)
    TestResult SETTOTALSPECS(numeric totalSpecs)
    TestResult SETTOTALSUITES(numeric totalSuites)
    TestResult end()
         Finish recording stats.
    TestResult endStats(struct stats)
         End processing of a bundle stats reference.
    any getBundleStats([string id])
         Get a bundle stats by path as a struct or the entire stats array if no path passed.
    struct getMemento()
         Get a flat representation of this result.
    any getSuiteStats(string id)
         Get a suite stats by id from the reverse lookup.
    any incrementSpecStat(string type, struct stats)
         Record a spec stat with its recursive chain.
    TestResult incrementSpecs(any count='1')
         Increment the global specs found.
    TestResult incrementStat(any type='pass', [numeric count='1'])
         Increment a global stat.
    TestResult incrementSuites(any count='1')
         Increment the global suites found.
    boolean isComplete()
         Verify testing is complete in results.
    struct startBundleStats(string bundlePath, string name)
         Start a new bundle stats and return its reference.
    struct startSpecStats(string name, struct suiteStats)
         Start a new spec stats and return its reference.
    struct startSuiteStats(string name, struct bundleStats, [struct parentStats='[runtime expression]'])
         Start a new suite stats and return its reference.
    any storeDebugBuffer([array buffer])
         Store latest bundle debug output buffer by adding it to the top bundle.
     
    Methods inherited from class WEB-INF.cftags.component
    None

    Constructor Detail

    init

    public init([numeric bundleCount='0'], [array labels='[runtime expression]'], [array testBundles='[runtime expression]'], [array testSuites='[runtime expression]'], [array testSpecs='[runtime expression]'])

    Constructor

    Parameters:
    bundleCount - the count to init the results for
    labels - The lables to use
    testBundles - The test bundles that should execute ONLY
    testSuites - The test suites that should execute ONLY
    testSpecs - The test specs that should execut ONLY

    Property Detail

    bundleStats

    property struct bundleStats

    Attributes:
    serializable - true
    required - false

    endTime

    property numeric endTime

    Attributes:
    serializable - true
    required - false

    labels

    property array labels

    Attributes:
    serializable - true
    required - false

    startTime

    property numeric startTime

    Attributes:
    serializable - true
    required - false

    testBundles

    property array testBundles

    Attributes:
    serializable - true
    required - false

    testSpecs

    property array testSpecs

    Attributes:
    serializable - true
    required - false

    testSuites

    property array testSuites

    Attributes:
    serializable - true
    required - false

    totalBundles

    property numeric totalBundles

    Attributes:
    serializable - true
    required - false

    totalDuration

    property numeric totalDuration

    Attributes:
    serializable - true
    required - false

    totalError

    property numeric totalError

    Attributes:
    serializable - true
    required - false

    totalFail

    property numeric totalFail

    Attributes:
    serializable - true
    required - false

    totalPass

    property numeric totalPass

    Attributes:
    serializable - true
    required - false

    totalSkipped

    property numeric totalSkipped

    Attributes:
    serializable - true
    required - false

    totalSpecs

    property numeric totalSpecs

    Attributes:
    serializable - true
    required - false

    totalSuites

    property numeric totalSuites

    Attributes:
    serializable - true
    required - false

    Method Detail

    GETENDTIME

    public numeric GETENDTIME()


    GETLABELS

    public array GETLABELS()


    GETSTARTTIME

    public numeric GETSTARTTIME()


    GETTESTBUNDLES

    public array GETTESTBUNDLES()


    GETTESTSPECS

    public array GETTESTSPECS()


    GETTESTSUITES

    public array GETTESTSUITES()


    GETTOTALBUNDLES

    public numeric GETTOTALBUNDLES()


    GETTOTALDURATION

    public numeric GETTOTALDURATION()


    GETTOTALERROR

    public numeric GETTOTALERROR()


    GETTOTALFAIL

    public numeric GETTOTALFAIL()


    GETTOTALPASS

    public numeric GETTOTALPASS()


    GETTOTALSKIPPED

    public numeric GETTOTALSKIPPED()


    GETTOTALSPECS

    public numeric GETTOTALSPECS()


    GETTOTALSUITES

    public numeric GETTOTALSUITES()


    SETBUNDLESTATS

    public TestResult SETBUNDLESTATS(struct bundleStats)

    Parameters:
    bundleStats

    SETENDTIME

    public TestResult SETENDTIME(numeric endTime)

    Parameters:
    endTime

    SETLABELS

    public TestResult SETLABELS(array labels)

    Parameters:
    labels

    SETSTARTTIME

    public TestResult SETSTARTTIME(numeric startTime)

    Parameters:
    startTime

    SETTESTBUNDLES

    public TestResult SETTESTBUNDLES(array testBundles)

    Parameters:
    testBundles

    SETTESTSPECS

    public TestResult SETTESTSPECS(array testSpecs)

    Parameters:
    testSpecs

    SETTESTSUITES

    public TestResult SETTESTSUITES(array testSuites)

    Parameters:
    testSuites

    SETTOTALBUNDLES

    public TestResult SETTOTALBUNDLES(numeric totalBundles)

    Parameters:
    totalBundles

    SETTOTALDURATION

    public TestResult SETTOTALDURATION(numeric totalDuration)

    Parameters:
    totalDuration

    SETTOTALERROR

    public TestResult SETTOTALERROR(numeric totalError)

    Parameters:
    totalError

    SETTOTALFAIL

    public TestResult SETTOTALFAIL(numeric totalFail)

    Parameters:
    totalFail

    SETTOTALPASS

    public TestResult SETTOTALPASS(numeric totalPass)

    Parameters:
    totalPass

    SETTOTALSKIPPED

    public TestResult SETTOTALSKIPPED(numeric totalSkipped)

    Parameters:
    totalSkipped

    SETTOTALSPECS

    public TestResult SETTOTALSPECS(numeric totalSpecs)

    Parameters:
    totalSpecs

    SETTOTALSUITES

    public TestResult SETTOTALSUITES(numeric totalSuites)

    Parameters:
    totalSuites

    end

    public TestResult end()

    Finish recording stats


    endStats

    public TestResult endStats(struct stats)

    End processing of a bundle stats reference

    Parameters:
    stats - The bundle stats structure reference to complete

    getBundleStats

    public any getBundleStats([string id])

    Get a bundle stats by path as a struct or the entire stats array if no path passed.

    Parameters:
    id - If passed, then retrieve by id

    getMemento

    public struct getMemento()

    Get a flat representation of this result


    getSuiteStats

    public any getSuiteStats(string id)

    Get a suite stats by id from the reverse lookup

    Parameters:
    id - Retrieve by id

    incrementSpecStat

    public any incrementSpecStat(string type, struct stats)

    Record a spec stat with its recursive chain

    Parameters:
    type - The type of stat to store: skipped,fail,error,pass
    stats

    incrementSpecs

    public TestResult incrementSpecs(any count='1')

    Increment the global specs found

    Parameters:
    count

    incrementStat

    public TestResult incrementStat(any type='pass', [numeric count='1'])

    Increment a global stat

    Parameters:
    type - The type of stat to increment: fail,pass,error or skipped
    count

    incrementSuites

    public TestResult incrementSuites(any count='1')

    Increment the global suites found

    Parameters:
    count

    isComplete

    public boolean isComplete()

    Verify testing is complete in results


    startBundleStats

    public struct startBundleStats(string bundlePath, string name)

    Start a new bundle stats and return its reference

    Parameters:
    bundlePath
    name

    startSpecStats

    public struct startSpecStats(string name, struct suiteStats)

    Start a new spec stats and return its reference

    Parameters:
    name - The name of the suite
    suiteStats - The suite stats reference this belongs to.

    startSuiteStats

    public struct startSuiteStats(string name, struct bundleStats, [struct parentStats='[runtime expression]'])

    Start a new suite stats and return its reference

    Parameters:
    name - The name of the suite
    bundleStats - The bundle stats reference this belongs to.
    parentStats - If passed, the parent stats this suite belongs to

    storeDebugBuffer

    public any storeDebugBuffer([array buffer])

    Store latest bundle debug output buffer by adding it to the top bundle

    Parameters:
    buffer