Every run
and runRaw
methods now accept a callbacks
argument, which can be a CFC with the right listener methods or a struct with the right closure methods. This will allow you to listen to the testing progress and get information about it. This way you can build informative reports or progress bars.
The available callbacks are:
// Called at the beginning of a test bundle cyclefunction onBundleStart( target, testResults )// Called at the end of the bundle testing cyclefunction onBundleEnd( target, testResults )​// Called anytime a new suite is about to be testedfunction onSuiteStart( target, testResults, suite )// Called after any suite has finalized testingfunction onSuiteEnd( target, testResults, suite )​// Called anytime a new spec is about to be testedfunction onSpecStart( target, testResults, suite, spec )// Called after any spec has finalized testingfunction onSpecEnd( target, testResults, suite, spec )