interface Extension
What is an extension? - An extension allows your code to interact with the Kotest Engine, changing the behavior of the engine at runtime.
How do they differ from Listeners? - They differ because listeners are purely "callback only" they are notified of events but they are unable to change the operation of the Engine.
Which should I use? - Always use a listener if you can - they are simpler. Only use an extension if you need to, for example, with an extension you can dynamically filter tests at runtime, or you can add tags to tests from a database.
ConstructorExtension |
interface ConstructorExtension : Extension |
DiscoveryExtension |
Allows interception of the discovery phase of Kotest. interface DiscoveryExtension : Extension |
SpecExtension |
Reusable spec extension that allows intercepting specs before they are executed. The callback is invoked for each Spec that has been submitted for execution. interface SpecExtension : Extension |
TagExtension |
Returns Tags to be used by the Test Engine in determining active tests. interface TagExtension : Extension |
TestCaseExtension |
Reusable extension that intercepts calls to a TestCase. interface TestCaseExtension : Extension |