Package-level declarations

Types

Link copied to clipboard

A context for a test-level fixture handling JUnit 4 rules.

Link copied to clipboard

A test containing a test action which raises assertion errors on failure.

Link copied to clipboard

Marker for an experimental TestBalloon API, which is not stable and may be changed or removed.

Link copied to clipboard
open class TestCompartment(name: String, testConfig: TestConfig) : TestSuite

A compartment isolating a number of tests from those belonging to other compartments.

Link copied to clipboard
open class TestConfig

A test element's configuration, modifying the execution of tests and suites.

Link copied to clipboard
Link copied to clipboard
typealias TestElementExecutionWrappingAction = suspend TestElement.(elementAction: suspend TestElement.() -> Unit) -> Unit

An action wrapping a TestElement's execution.

Link copied to clipboard
abstract class TestExecutionReport

A report containing a sequence of test events, each of which will be added during execution.

Link copied to clipboard

A test fixture is a state holder for a lazily initialized Value to be used in tests.

Link copied to clipboard
interface TestPlatform

The platform executing tests.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A compilation module's root test suite, holding the module-wide default configuration.

Link copied to clipboard

A test suite containing child TestElements (tests and/or suites).

Link copied to clipboard
interface TestSuiteScope

A TestSuite-based registration scope for tests, test suites and fixtures.

Properties

Link copied to clipboard

The JUnit 4 description for this Test.

Link copied to clipboard

The TestPlatform currently used to execute tests.

Functions

Link copied to clipboard

Returns a test configuration which adds permits for all TestSuites of a TestElement hierarchy.

Link copied to clipboard

Returns a test configuration which wraps executionWrappingAction around a single test element.

Link copied to clipboard

Returns a test configuration which wraps executionWrappingAction around each element of a TestElement hierarchy.

Link copied to clipboard

Returns a test configuration which wraps executionWrappingAction around each Test of a TestElement hierarchy.

Link copied to clipboard

Returns a test configuration which wraps a coroutine context around the TestElement's execution.

Link copied to clipboard

Returns a test configuration which disables test execution for a TestElement hierarchy.

Link copied to clipboard

Returns a test configuration which adds a TestExecutionReport to a test element hierarchy.

Link copied to clipboard
fun TestConfig.failFast(maxFailureCount: Int): TestConfig

Returns a test configuration which establishes a "fail fast" strategy on a TestElement hierarchy.

Link copied to clipboard

Returns a test configuration which specifies an invocation mode for all TestSuites of a TestElement hierarchy.

Link copied to clipboard
fun TestConfig.mainDispatcher(dispatcher: CoroutineDispatcher? = null): TestConfig

Returns a test configuration which specifies a main dispatcher (Dispatchers.setMain) for a TestElement hierarchy.

Link copied to clipboard

Returns a test configuration which specifies a set of permits for all TestSuites of a TestElement hierarchy.

Link copied to clipboard

Returns a test configuration which removes permits for all TestSuites of a TestElement hierarchy.

Link copied to clipboard

Returns a test configuration which wraps a single-threaded dispatcher around a TestElement's execution.

Link copied to clipboard
fun TestConfig.testScope(isEnabled: Boolean, timeout: Duration = 60.seconds): TestConfig

Returns a test configuration which enables/disables a TestScope for a TestElement hierarchy.

Link copied to clipboard
fun testSuite(name: String = "", displayName: String = name, testConfig: TestConfig = TestConfig, content: TestSuite.() -> Unit): Lazy<TestSuite>
fun testSuite(name: String = "", displayName: String = name, compartment: () -> TestCompartment, testConfig: TestConfig = TestConfig, content: TestSuite.() -> Unit): Lazy<TestSuite>

Registers a top-level TestSuite.

Link copied to clipboard

Returns a test configuration which applies a TestConfig.ExecutionTraversal to each element of a TestElement hierarchy.

Link copied to clipboard
suspend fun withMainDispatcher(dispatcher: CoroutineDispatcher? = null, action: suspend () -> Unit)

Runs action with dispatcher set up as the main dispatcher, which will be reset afterward.

Link copied to clipboard
@ExperimentalCoroutinesApi
actual suspend fun withSingleThreadedDispatcher(action: suspend (dispatcher: CoroutineDispatcher) -> Unit)
expect suspend fun withSingleThreadedDispatcher(action: suspend (dispatcher: CoroutineDispatcher) -> Unit)

Executes action, providing it with a single-threaded CoroutineDispatcher.

actual suspend fun withSingleThreadedDispatcher(action: suspend (dispatcher: CoroutineDispatcher) -> Unit)
actual suspend fun withSingleThreadedDispatcher(action: suspend (dispatcher: CoroutineDispatcher) -> Unit)
actual suspend fun withSingleThreadedDispatcher(action: suspend (dispatcher: CoroutineDispatcher) -> Unit)
actual suspend fun withSingleThreadedDispatcher(action: suspend (dispatcher: CoroutineDispatcher) -> Unit)