public class TestCaseExecutor
The class TestCaseExecutor is responsible for preparing and executing a single TestCase.
A test may be executed multiple times, if the config has set invocations > 1. Also, tests may be executed concurrently if threads > 1.
This class handles notifications to TestListener instances, as well as any TestCaseExtension instances which may intercept and circumvent execution.
A TestCase is only executed if it is considered active (see isActive), otherwise a result of TestResult.Ignored is returned.
Executing a TestCase is a blocking operation. Although each invocation of the test closure will occur in a coroutine, the overall test execution will block until all runs are completed and the final TestResult is returned.
The executor can be shared between multiple tests as it is thread safe.
class TestCaseExecutor| Constructor and Description |
|---|
TestCaseExecutor(TestEngineListener listener,
java.util.concurrent.ExecutorService executor,
java.util.concurrent.ScheduledExecutorService scheduler)
The
class TestCaseExecutor is responsible for preparing and executing a single TestCase. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
execute(io.kotlintest.TestCase testCase,
io.kotlintest.TestContext context,
kotlin.jvm.functions.Function1<? super io.kotlintest.TestResult,kotlin.Unit> onResult,
kotlin.coroutines.experimental.Continuation<? super kotlin.Unit> p) |
public TestCaseExecutor(TestEngineListener listener, java.util.concurrent.ExecutorService executor, java.util.concurrent.ScheduledExecutorService scheduler)
The class TestCaseExecutor is responsible for preparing and executing a single TestCase.
A test may be executed multiple times, if the config has set invocations > 1. Also, tests may be executed concurrently if threads > 1.
This class handles notifications to TestListener instances, as well as any TestCaseExtension instances which may intercept and circumvent execution.
A TestCase is only executed if it is considered active (see isActive), otherwise a result of TestResult.Ignored is returned.
Executing a TestCase is a blocking operation. Although each invocation of the test closure will occur in a coroutine, the overall test execution will block until all runs are completed and the final TestResult is returned.
The executor can be shared between multiple tests as it is thread safe.
class TestCaseExecutor