public class InstancePerTestSpecRunner
extends SpecRunner
Implementation of class SpecRunner that executes each TestCase in a fresh instance
of the Spec class.
This differs from the class InstancePerLeafSpecRunner in that
every single test, whether of type TestType.Test or TestType.Container, will be
executed separately. Branch tests will ultimately be executed once as a standalone
test, and also as part of the "path" to any nested tests.
So, given the following structure:
outerTest { innerTestA { // test } innerTestB { // test } }
Three spec instances will be created. The execution process will be:
spec1 = instantiate spec spec1.outerTest spec2 = instantiate spec spec2.outerTest spec2.innerTestA spec3 = instantiate spec spec3.outerTest spec3.innerTestB
class SpecRunner,
class InstancePerLeafSpecRunner| Modifier and Type | Class and Description |
|---|---|
static class |
InstancePerTestSpecRunner.Enqueued |
| Constructor and Description |
|---|
InstancePerTestSpecRunner(TestEngineListener listener,
java.util.concurrent.ExecutorService listenerExecutor,
java.util.concurrent.ScheduledExecutorService scheduler)
Implementation of
class SpecRunner that executes each TestCase in a fresh instance
of the Spec class. |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<io.kotlintest.TestCase,io.kotlintest.TestResult> |
execute(io.kotlintest.Spec spec,
io.kotlintest.extensions.TopLevelTests topLevelTests)
When executing a TestCase, any child test cases that are found, are placed onto
a stack. When the test case has completed, we take the next test case from the
stack, and begin executing that.
|
execute, getListener, interceptSpecpublic InstancePerTestSpecRunner(TestEngineListener listener, java.util.concurrent.ExecutorService listenerExecutor, java.util.concurrent.ScheduledExecutorService scheduler)
Implementation of class SpecRunner that executes each TestCase in a fresh instance
of the Spec class.
This differs from the class InstancePerLeafSpecRunner in that
every single test, whether of type TestType.Test or TestType.Container, will be
executed separately. Branch tests will ultimately be executed once as a standalone
test, and also as part of the "path" to any nested tests.
So, given the following structure:
outerTest { innerTestA { // test } innerTestB { // test } }
Three spec instances will be created. The execution process will be:
spec1 = instantiate spec spec1.outerTest spec2 = instantiate spec spec2.outerTest spec2.innerTestA spec3 = instantiate spec spec3.outerTest spec3.innerTestB
class SpecRunner,
class InstancePerLeafSpecRunnerpublic java.util.Map<io.kotlintest.TestCase,io.kotlintest.TestResult> execute(io.kotlintest.Spec spec,
io.kotlintest.extensions.TopLevelTests topLevelTests)
When executing a TestCase, any child test cases that are found, are placed onto a stack. When the test case has completed, we take the next test case from the stack, and begin executing that.