TestConfig
A test element's configuration, modifying the execution of tests and suites.
A test element can be configured via any number of chained TestConfigs.
When TestConfigs are combined into a chain,
a conflicting TestConfig which occurs later takes precedence over an earlier one,
non-conflicting coroutine context elements accumulate,
a series of aroundAll, aroundEach wrappers, or traversals nest from the outside to the inside in order of appearance.
Each TestConfig operates at the TestElement level where it is configured. However, child elements inherit some configuration effects as described in the respective TestConfig function.
Use an existing configuration or the empty TestConfig object as the starting point, then invoke the TestConfig functions to return chained configurations.
Example:
testConfig = TestConfig
.coroutineContext(UnconfinedTestDispatcher())
.invocation(TestInvocation.CONCURRENT)Inheritors
Functions
Returns a test configuration which adds permits for all TestSuites of a TestElement hierarchy.
Returns a test configuration which wraps executionWrappingAction around a single test element.
Returns a test configuration which wraps executionWrappingAction around each element of a TestElement hierarchy.
Returns a test configuration which wraps executionWrappingAction around each Test of a TestElement hierarchy.
Returns a TestConfig which chains this configuration with otherConfiguration.
Returns a test configuration which wraps a coroutine context around the TestElement's execution.
Returns a test configuration which disables test execution for a TestElement hierarchy.
Returns a test configuration which adds a TestExecutionReport to a test element hierarchy.
Returns a test configuration which establishes a "fail fast" strategy on a TestElement hierarchy.
Returns a test configuration which specifies an invocation mode for all TestSuites of a TestElement hierarchy.
Returns a test configuration which specifies a main dispatcher (Dispatchers.setMain) for a TestElement hierarchy.
Returns a test configuration which specifies a set of permits for all TestSuites of a TestElement hierarchy.
Returns a test configuration which removes permits for all TestSuites of a TestElement hierarchy.
Returns a test configuration which wraps a single-threaded dispatcher around a TestElement's execution.
Returns a test configuration which enables/disables a kotlinx.coroutines.test.TestScope for a TestElement hierarchy.
Returns a test configuration which applies a TestExecutionTraversal to each element of a TestElement hierarchy.