kotest-core / io.kotest.core.extensions / TestCaseExtension

TestCaseExtension

interface TestCaseExtension : Extension

Reusable extension that intercepts calls to a TestCase.

These extensions can be registered project wide using AbstractProjectConfig.extensions, or on a per-spec basis by setting extensions() in a Spec class, or finally on individual tests themselves via TestCaseConfig.

Functions

intercept

Intercepts a TestCase.

abstract suspend fun intercept(testCase: TestCase, execute: suspend (TestCase) -> TestResult): TestResult