public static class TestEngineListener.DefaultImpls
Implementations of this interface will be notified of events
that occur as part of the class TestEngine lifecycle.
This is an internal listener liable to be changed.
class TestEngine| Modifier and Type | Method and Description |
|---|---|
static void |
afterSpecClass(TestEngineListener $this,
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.
|
static void |
afterTestCaseExecution(TestEngineListener $this,
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.
|
static void |
beforeSpecClass(TestEngineListener $this,
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. |
static void |
beforeTestCaseExecution(TestEngineListener $this,
io.kotlintest.TestCase testCase)
Invoked if a TestCase will be executed (is active).
|
static void |
engineFinished(TestEngineListener $this,
java.lang.Throwable t)
Is invoked when the
class TestEngine has finished execution. |
static void |
engineStarted(TestEngineListener $this,
java.util.List<? extends kotlin.reflect.KClass<? extends io.kotlintest.Spec>> classes)
Is invoked when the
class TestEngine is starting execution. |
static void |
enterTestCase(TestEngineListener $this,
io.kotlintest.TestCase testCase)
Invoked each time a TestCase has been entered from a parent test.
|
static void |
exitTestCase(TestEngineListener $this,
io.kotlintest.TestCase testCase,
io.kotlintest.TestResult result)
Executed each time a TestCase has completed.
|
static void |
invokingTestCase(TestEngineListener $this,
io.kotlintest.TestCase testCase,
int k)
Invoked each time a TestCase is about to be executed with a unique
ordinal for each execution.
|
static void |
specCreated(TestEngineListener $this,
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 static void engineStarted(TestEngineListener $this, 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 static void engineFinished(TestEngineListener $this, 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 static void beforeSpecClass(TestEngineListener $this, 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 static void afterSpecClass(TestEngineListener $this, 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 static void enterTestCase(TestEngineListener $this, 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 static void exitTestCase(TestEngineListener $this, 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 static void beforeTestCaseExecution(TestEngineListener $this, io.kotlintest.TestCase testCase)
Invoked if a TestCase will be executed (is active).
public static void invokingTestCase(TestEngineListener $this, 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 static void afterTestCaseExecution(TestEngineListener $this, 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 static void specCreated(TestEngineListener $this, 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.