Springboot test fails to run

479 Views Asked by At

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..."){
            ...
        }
    }

}
0

There are 0 best solutions below