Interface org.as2lib.test.unit.TestResult

Description

TestResult represents the infromations that got collected during the execution of a related Test.

A Test should not contain the informations about its execution. TestResult represents the pool of all informations collected during the execution of the Test by its TestRunner.

Every TestResult depends to the state of the execution of the related Test. Different informations changed during the execution.

See Also

Method Index

getName(), getOperationTime(), getPercentage(), getTestCaseResults(), getTestResults(), hasErrors(), hasFinished(), hasStarted()

Inherited from BasicInterface

Method Detail

getPercentage

public function getPercentage(Void):Number

Returns the percentage ( 0- 100) of the execution.

Return

percentage of execution

hasFinished

public function hasFinished(Void):Boolean

Returns true if the TestCase has been finished.

Return

true if the TestCase has been finished.

hasStarted

public function hasStarted(Void):Boolean

Returns true if the TestCase has been started.

Return

true if the TestCase has been started

getName

public function getName(Void):String

Returns the name of the TestResult.

Return

name of the TestResult

getOperationTime

public function getOperationTime(Void):Time

Returns the total operation time for all methods executed for the related Test.

Return

total operation time of the Test

hasErrors

public function hasErrors(Void):Boolean

Returns true if the errors occured during the execution of the related Test.

Return

true if the errors occured during the execution of the related Test.

getTestResults

public function getTestResults(Void):TypedArray

Returns all TestResults for the Tests contained within the related Test.

Since its possible to add more than one Test to a TestSuite its necessary to get the TestResults to all added Tests.

It flattens out all TestResults, this means it concats all getTestResults of every added Test.

Return

all TestResults to all contained Tests

getTestCaseResults

public function getTestCaseResults(Void):TypedArray

Returns all TestCaseResults for the TestCases contained within the related Test.

Since its possible to add more than one Test to a TestSuite its necessary to get the TestResults to all added Tests.

TestCase represents the lowest level of Test therefor its important to get all added TestCaseResults seperatly.

It flattens out all TestResults, this means it concats all getTestCaseResults of every added Test.

Return

all TestResults to all contained Tests