API Documentation | All Packages | All Classes | Index | Frames No Frames |
TraceListener

Package | org.flexunit.internals
Class | public class TraceListener
Inheritance | TraceListener RunListener Object

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

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | result : Result The Result recieved for a finished test run. | RunListener

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | TraceListener() Constructor. | TraceListener
|  | testAssumptionFailure(failure:Failure):void 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
|  | 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
|  | 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

| Method | Defined 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`

Thu Apr 10 2014, 08:07 AM +10:00