kotest-core / io.kotest.core.test / TestContext / <init>

<init>

TestContext()

A TestContext is used as the receiver of a closure that is associated with a TestCase.

This allows the scope body to interact with the test engine, for instance, adding metadata during a test, inspecting the current TestCaseConfig, or notifying the runtime of a nested test.

The test context extends CoroutineScope giving the ability for any test closure to launch coroutines directly, without requiring them to create a scope.