Packageorg.flexunit.internals
Classpublic class TraceListener
InheritanceTraceListener Inheritance RunListener Inheritance Object

A TraceListener will trace the events encountered during the course of a test run.



Public Properties
 PropertyDefined By
 Inheritedresult : Result
The Result recieved for a finished test run.
RunListener
Public Methods
 MethodDefined By
  
Constructor.
TraceListener
 Inherited
Called when an atomic test flags that it assumes a condition that is false
RunListener
  
testFailure(failure:Failure):void
[override] Called when an atomic test fails.
TraceListener
 Inherited
testFinished(description:IDescription):void
Called when an atomic test has finished, whether the test succeeds or fails.
RunListener
  
testIgnored(description:IDescription):void
[override] Called when a test will not be run, generally because a test method is annotated with org.junit.Ignore.
TraceListener
  
testRunFinished(result:Result):void
[override] Called when all tests have finished
TraceListener
 Inherited
testRunStarted(description:IDescription):void
Called before any tests have been run.
RunListener
  
testStarted(description:IDescription):void
[override] Called when an atomic test is about to be started.
TraceListener
  
testTimed(description:IDescription, runTime:Number):void
Outputs timing information for the running test
TraceListener
Protected Methods
 MethodDefined By
  
elapsedTimeAsString(runTime:Number):String
Returns the formatted string of the elapsed time.
TraceListener
  
printFailure(failure:Failure, prefix:String):void
Traces a provided failure with a certain prefix
TraceListener
  
printFailures(result:Result):void
Traces all failures that were received in the result
TraceListener
  
printFooter(result:Result):void
Traces a footer for the provided result
TraceListener
  
printHeader(runTime:Number):void
Traces a header that provides the total run time
TraceListener
Constructor Detail
TraceListener()Constructor
public function TraceListener()

Constructor.

Method Detail
elapsedTimeAsString()method
protected function elapsedTimeAsString(runTime:Number):String

Returns the formatted string of the elapsed time. Duplicated from BaseTestRunner. Fix it.

Parameters

runTime:Number

Returns
String
printFailure()method 
protected function printFailure(failure:Failure, prefix:String):void

Traces a provided failure with a certain prefix

Parameters

failure:Failure — The provided failure
 
prefix:String — A String prefix for the failure

printFailures()method 
protected function printFailures(result:Result):void

Traces all failures that were received in the result

Parameters

result:Result — The result that contains potential failures

printFooter()method 
protected function printFooter(result:Result):void

Traces a footer for the provided result

Parameters

result:Result — The result that contains the total run count

printHeader()method 
protected function printHeader(runTime:Number):void

Traces a header that provides the total run time

Parameters

runTime:Number — The total run time of all tests in milliseconds

testFailure()method 
override public function testFailure(failure:Failure):void

Called when an atomic test fails.

Parameters

failure:Failure — describes the test that failed and the exception that was thrown

testIgnored()method 
override public function testIgnored(description:IDescription):void

Called when a test will not be run, generally because a test method is annotated with org.junit.Ignore.

Parameters

description:IDescription — describes the test that will not be run

testRunFinished()method 
override public function testRunFinished(result:Result):void

Called when all tests have finished

Parameters

result:Result — the summary of the test run, including all the tests that failed

testStarted()method 
override public function testStarted(description:IDescription):void

Called when an atomic test is about to be started.

Parameters

description:IDescription — the description of the test that is about to be run (generally a class and method name)

testTimed()method 
public function testTimed(description:IDescription, runTime:Number):void

Outputs timing information for the running test

Parameters

description:IDescription
 
runTime:Number