0

I'm trying to run an integration test using kotest and running in to the below error. The tests run fine if I only run a single test but it fails when I try to run all tests in the class.

Failed to find merged annotation for @org.springframework.test.context.BootstrapWith(org.springframework.boot.test.context.SpringBootTestContextBootstrapper.class)
java.lang.IllegalStateException: Failed to find merged annotation for @org.springframework.test.context.BootstrapWith(org.springframework.boot.test.context.SpringBootTestContextBootstrapper.class)

HelloTest.kt

@SpringBootTest(classes = [DemoApplication::class])
class HelloTest: FunSpec() {

    override fun extensions() = listOf(SpringExtension)

    init{
        test("should..."){
            ...
        }
        
        test("should..."){
            ...
        }
    }

}
  • I think you have an issue with conflicting dependencies. Can you post your `mvn dependency:tree` output? Or `gradle dependencies`, if you use gradle. – Emil Kantis May 05 '22 at 20:33
  • Also please include your imports. There's a SpringExtension for JUnit included with Spring, I sometimes get them mixed up when importing and using the wrong one could also lead to problems – Emil Kantis May 05 '22 at 20:33

0 Answers0