interface TestEngineListener
Implementations of this interface will be notified of events that occur as part of the KotestEngine lifecycle.
This is an internal listener liable to be changed.
engineFinished |
Is invoked when the KotestEngine has finished execution. open fun engineFinished(t: Throwable?): Unit |
engineStarted |
Is invoked when the KotestEngine is starting execution. open fun engineStarted(classes: List<KClass<out Spec>>): Unit |
specFinished |
Is invoked once per Spec to indicate that all TestCase instances of the spec have completed. open fun specFinished(kclass: KClass<out Spec>, t: Throwable?, results: Map<TestCase, TestResult>): Unit |
specInstantiated |
Invoked each time an instance of a Spec is created. A spec may be created once per class, or one per TestCase. open fun specInstantiated(spec: Spec): Unit |
specInstantiationError |
open fun specInstantiationError(kclass: KClass<out Spec>, t: Throwable): Unit |
specStarted |
Is invoked once per Spec to indicate that this spec is about to begin execution. open fun specStarted(kclass: KClass<out Spec>): Unit |
testFinished |
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. open fun testFinished(testCase: TestCase, result: TestResult): Unit |
testIgnored |
Invoked if a TestCase will not be executed because it is ignored (not active). open fun testIgnored(testCase: TestCase, reason: String?): Unit |
testStarted |
Invoked if a TestCase is about to be executed (is active). Will not be invoked if the test is ignored. open fun testStarted(testCase: TestCase): Unit |
IsolationTestEngineListener |
class IsolationTestEngineListener : TestEngineListener |
SynchronizedTestEngineListener |
class SynchronizedTestEngineListener : TestEngineListener |