Class org.as2lib.test.unit.TestCaseRunner

Implemented Interfaces

TestRunner StepByStepProcess

Description

TestCaseRunner is the implementation for the execution of TestCases.

It executes and handles all operations to process the certain TestCase.

Usually you do not get in touch with the TestCaseRunner because any TestCase handles it automatically.

As its a implementation of TestRunner it is possible to add any org.as2lib.app.exec.ProcessListener as listener to the execution of the TestCaseRunner.

Field Index

Inherited from LogSupport

Method Index

new TestCaseRunner()
addInfo(), getCurrentTestCase(), getCurrentTestCaseMethodInfo(), getPercentage(), getTestResult(), nextStep()

Inherited from AbstractProcess

Inherited from AbstractTimeConsumer

Inherited from EventSupport

Inherited from LogSupport

Inherited from BasicClass

Constructor Detail

TestCaseRunner

function TestCaseRunner(testCase:TestCase)

Constructs a new TestCaseRunner.

Parameters

testCase TestCase that should be executed.

Method Detail

getTestResult

public function getTestResult(Void):TestResult

Returns the TestCaseResult to the executed TestCase.

The result contains all informations about the connected TestCase. Since it is available even if the TestCaseRunner has not been started or finished the execution it is possible that the result is not complete at the request. But it contains all informations about the methods that will be executed.

Return

TestResult for the TestCase that contains all informations

Specified By

getTestResult() in org.as2lib.test.unit.TestRunner

getCurrentTestCase

public function getCurrentTestCase(Void):TestCaseResult

Returns the current executing TestCaseResult.

It is necessary to get the TestCaseResult for the TestCase that just gets executed because there can be more than one TestCase available within a TestResult.

Return

TestCaseResult related to the TestCase

Specified By

getCurrentTestCase() in org.as2lib.test.unit.TestRunner

getCurrentTestCaseMethodInfo

public function getCurrentTestCaseMethodInfo(Void):TestCaseMethodInfo

Returns the current executing TestCaseMethodInfo.

It is necessary to get the TestCaseMethodInfo for the method that just gets executed because there can be more than one methods available within a TestCaseResult.

Return

informations about the current executing method

Specified By

getCurrentTestCaseMethodInfo() in org.as2lib.test.unit.TestRunner

See Also

addInfo

public function addInfo(info:ExecutionInfo):Void

Adds a information about the current executing method.

Parameters

info ExecutionInfo to be added

nextStep

public function nextStep(Void):Void

Executes the next step of the Process

Implementation of StepByStepProcess.nextStep.

Specified By

nextStep() in org.as2lib.app.exec.StepByStepProcess

getPercentage

public function getPercentage(Void):Number

Returns the percentage of execution of the TestCase.

Specified By

getPercentage() in org.as2lib.app.exec.Process

Overrides

getPercentage() in org.as2lib.app.exec.AbstractTimeConsumer