kotest-core / io.kotest.core.engine / SingleInstanceSpecRunner

SingleInstanceSpecRunner

@ExperimentalTime class SingleInstanceSpecRunner : SpecRunner

Implementation of SpecRunner that executes all tests against the same Spec instance. In other words, only a single instance of the spec class is instantiated for all the test cases.

Types

Context

inner class Context : TestContext

Constructors

<init>

Implementation of SpecRunner that executes all tests against the same Spec instance. In other words, only a single instance of the spec class is instantiated for all the test cases.

SingleInstanceSpecRunner(listener: TestEngineListener)

Functions

execute

Executes all the tests in this spec, returning a Failure if there was an exception in a listener or class initializer. Otherwise returns the results for the tests in that spec.

suspend fun execute(spec: Spec): Try<Map<TestCase, TestResult>>