https://kotlinlang.org logo
#kotest
Title
# kotest
k

Kirill Zhukov

09/07/2023, 6:07 AM
What’s the recommended way to implement custom `Spec`s? For example if I want to implement an
IntegrationSpec
for integration tests and make it include some common tags, extensions and whatnot under the hood.
Is it even recommended to implement a custom
Spec
? Looks like Kotest IJ plugin won’t pick up custom specs…
w

Wesley Hartford

09/07/2023, 2:17 PM
I've done this by creating an abstract class which extends
DslDrivenSpec
and
FunSpecRootScope
. If your IDE isn't picking up that the class is a test suite, try annotating it with
@org.junit.platform.commons.annotation.Testable
. I'm not sure if that's only necessary on your new abstract class, or on the test classes themselves.
3 Views