LifeCycleListeners

The lifecycle listeners collections. You must use this instance in order to extend the runner. You can have as many listeners as you want. The only restriction is for ITestExecutor, which has no sense to have more than one instance for a run

Members

Functions

add
void add(T listener)

Add a listener to the collection

attach
void attach(Attachment attachment)

Send the attachment to all listeners

begin
void begin(ulong testCount)

Send the begin run event to all listeners

begin
void begin(SuiteResult suite)

Send the begin suite event to all listeners

begin
void begin(string suite, TestResult test)

Send the begin test event to all listeners

begin
void begin(string suite, string test, StepResult step)

Send the begin step event to all listeners

beginExecution
SuiteResult[] beginExecution(const(TestCase)[] tests)

Send the begin execution with the test case list to the executor listener

end
void end(SuiteResult[] result)

Send the end runer event to all listeners

end
void end(SuiteResult suite)

Send the end suite event to all listeners

end
void end(string suite, TestResult test)

Send the end test event to all listeners

end
void end(string suite, string test, StepResult step)

Send the end step event to all listeners

endExecution
SuiteResult[] endExecution()

Send the end execution the executor listener

execute
SuiteResult[] execute(const(TestCase) func)

Send the execute test to the executor listener

getTestCases
TestCase[] getTestCases()
update
void update()

Send the update event to all listeners

Properties

isRunning
bool isRunning [@property getter]

True if the tests are being executed

runningTest
string runningTest [@property getter]

Return an unique name for the current running test. If there is no test running it will return an empty string

Static variables

instance
LifeCycleListeners instance;

The global instange.

Meta