kotest-core / io.kotest.core.filters / TestCaseFilter

TestCaseFilter

interface TestCaseFilter : Filter

A TestCaseFilter can be used to filter tests before they are executed. They are passed to KotestEngine at runtime.

In this way it is similar to a TestCaseExtension but with a specialized purpose and therefore simpler to use.

Functions

filter

This method is invoked with the test Description and the result used to determine if the test should be included or not.

abstract fun filter(description: Description): TestFilterResult

Extension Functions

toExtension

Creates an extension from this test case filter so it can be used as an extension.

fun TestCaseFilter.toExtension(): TestCaseExtension