public DiscoveryExtension extends ProjectLevelExtension
Allows interception of the discovery phase of KotlinTest.
The discovery phase is the part of the test cycle that finds
possible interface Spec classes on the classpath and then instantiates them
ready to be executed.
Note: If multiple interface DiscoveryExtensions are registered, the order
in which they execute is not specified.
interface Spec,
interface DiscoveryExtension| Modifier and Type | Method and Description |
|---|---|
java.util.List<kotlin.reflect.KClass> |
afterScan(java.util.List<? extends kotlin.reflect.KClass<? extends io.kotlintest.Spec>> classes)
Invoked as soon as the scan phase is complete. At that point,
the
interface Spec classes have been detected, but not yet instantiated
or executed. |
java.util.List<kotlin.reflect.KClass> afterScan(java.util.List<? extends kotlin.reflect.KClass<? extends io.kotlintest.Spec>> classes)
Invoked as soon as the scan phase is complete. At that point,
the interface Spec classes have been detected, but not yet instantiated
or executed.
Overriding this function gives implementations the possibility of filtering the specs seen by the test engine.
For instance, a possible extension may filter tests by package name, class name, classes that only implement a certain interface, etc.
classes - the KClass for each discovered interface Specinterface Spec