public class InstancePerLeafSpecRunner
extends SpecRunner
Implementation of class SpecRunner that executes each leaf test (that is a TestCase which
has type TestType.Test) in a fresh instance of the Spec class (that is, isolated
from other leaf executions).
Each branch test (that is a TestCase of type TestType.Container) is only executed as part of the execution "path" to the leaf test. In other words, the branch tests are not executed "stand alone".
So, given the following structure:
outerTest { innerTestA { // test } innerTestB { // test } }
Two spec instances will be created. The execution process will be:
spec1 = instantiate spec spec1.outerTest spec1.innerTestA spec2 = instantiate spec spec2.outerTest spec2.innerTestB
A failure in a branch test will prevent nested tests from executing.
class SpecRunner| Modifier and Type | Class and Description |
|---|---|
static class |
InstancePerLeafSpecRunner.Enqueued |
| Constructor and Description |
|---|
InstancePerLeafSpecRunner(TestEngineListener listener,
java.util.concurrent.ExecutorService listenerExecutor,
java.util.concurrent.ScheduledExecutorService scheduler)
Implementation of
class SpecRunner that executes each leaf test (that is a TestCase which
has type TestType.Test) in a fresh instance of the Spec class (that is, isolated
from other leaf executions). |
| 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) |
execute, getListener, interceptSpecpublic InstancePerLeafSpecRunner(TestEngineListener listener, java.util.concurrent.ExecutorService listenerExecutor, java.util.concurrent.ScheduledExecutorService scheduler)
Implementation of class SpecRunner that executes each leaf test (that is a TestCase which
has type TestType.Test) in a fresh instance of the Spec class (that is, isolated
from other leaf executions).
Each branch test (that is a TestCase of type TestType.Container) is only executed as part of the execution "path" to the leaf test. In other words, the branch tests are not executed "stand alone".
So, given the following structure:
outerTest { innerTestA { // test } innerTestB { // test } }
Two spec instances will be created. The execution process will be:
spec1 = instantiate spec spec1.outerTest spec1.innerTestA spec2 = instantiate spec spec2.outerTest spec2.innerTestB
A failure in a branch test will prevent nested tests from executing.
class SpecRunner