public class IsolationTestEngineListener implements TestEngineListener
TestEngineListener.DefaultImpls| Constructor and Description |
|---|
IsolationTestEngineListener(TestEngineListener listener) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterSpecClass(kotlin.reflect.KClass<? extends io.kotlintest.Spec> klass,
java.lang.Throwable t)
Is invoked once per Spec to indicate that all TestCase instances
of the spec have returned and the SpecRunner has completed.
|
void |
afterTestCaseExecution(io.kotlintest.TestCase testCase,
io.kotlintest.TestResult result)
Invoked when all the invocations of a TestCase have completed.
This function will only be invoked if a test case was active.
The result passed in here is the result directly from the test run, before any interception.
|
void |
beforeSpecClass(kotlin.reflect.KClass<? extends io.kotlintest.Spec> klass)
Is invoked once per Spec when the
class TestEngine is preparing
to submit the spec for execution to a SpecRunner. |
void |
engineFinished(java.lang.Throwable t)
Is invoked when the
class TestEngine has finished execution. |
void |
engineStarted(java.util.List<? extends kotlin.reflect.KClass<? extends io.kotlintest.Spec>> classes)
Is invoked when the
class TestEngine is starting execution. |
void |
enterTestCase(io.kotlintest.TestCase testCase)
Invoked each time a TestCase has been entered from a parent test.
|
void |
exitTestCase(io.kotlintest.TestCase testCase,
io.kotlintest.TestResult result)
Executed each time a TestCase has completed.
|
TestEngineListener |
getListener() |
void |
invokingTestCase(io.kotlintest.TestCase testCase,
int k)
Invoked each time a TestCase is about to be executed with a unique
ordinal for each execution.
|
void |
specCreated(io.kotlintest.Spec spec)
Invoked each time an instance of a Spec is created.
A spec may be created once per class, or one per TestCase.
|
void |
specInitialisationFailed(kotlin.reflect.KClass<? extends io.kotlintest.Spec> klass,
java.lang.Throwable t)
Is invoked if a Spec throws an exception during initialisation
|
afterSpecClass, afterTestCaseExecution, beforeSpecClass, beforeTestCaseExecution, engineFinished, engineStarted, enterTestCase, exitTestCase, invokingTestCase, specCreated, specInitialisationFailedpublic IsolationTestEngineListener(TestEngineListener listener)
public void engineFinished(java.lang.Throwable t)
Is invoked when the class TestEngine has finished execution.
If an unrecoverable error was detected during execution then it will be passed as the parameter to the engine.
class TestEnginepublic void engineStarted(java.util.List<? extends kotlin.reflect.KClass<? extends io.kotlintest.Spec>> classes)
Is invoked when the class TestEngine is starting execution.
classes - the Spec classes that will be used by the class TestEngine.class TestEnginepublic void specCreated(io.kotlintest.Spec spec)
Invoked each time an instance of a Spec is created. A spec may be created once per class, or one per TestCase.
public void specInitialisationFailed(kotlin.reflect.KClass<? extends io.kotlintest.Spec> klass,
java.lang.Throwable t)
Is invoked if a Spec throws an exception during initialisation
public void beforeSpecClass(kotlin.reflect.KClass<? extends io.kotlintest.Spec> klass)
Is invoked once per Spec when the class TestEngine is preparing
to submit the spec for execution to a SpecRunner.
class TestEngine,
SpecRunnerpublic void enterTestCase(io.kotlintest.TestCase testCase)
Invoked each time a TestCase has been entered from a parent test.
If a parent test has been configured with multiple invocations, then this function will be executed once per parent invocation.
public void invokingTestCase(io.kotlintest.TestCase testCase,
int k)
Invoked each time a TestCase is about to be executed with a unique ordinal for each execution.
If a test case is configured with invocations = k, then this function will be invoked k times.
k - indicates the execution number - if a test is configured with threads > 1, then it is
not guaranteed (and very unlikely) that k will be ordered.public void afterTestCaseExecution(io.kotlintest.TestCase testCase,
io.kotlintest.TestResult result)
Invoked when all the invocations of a TestCase have completed. This function will only be invoked if a test case was active. The result passed in here is the result directly from the test run, before any interception.
public void exitTestCase(io.kotlintest.TestCase testCase,
io.kotlintest.TestResult result)
Executed each time a TestCase has completed.
This function will always be executed even if the test case is skipped. The result passed in here will be after test case interception.
If a parent test case has been configured with multiple invocations, then this function will be executed once per parent invocation.
public void afterSpecClass(kotlin.reflect.KClass<? extends io.kotlintest.Spec> klass,
java.lang.Throwable t)
Is invoked once per Spec to indicate that all TestCase instances of the spec have returned and the SpecRunner has completed.
public TestEngineListener getListener()