Migrate Spring Boot Testing to Quarkus Testing

MSAL

Migrates Spring Boot test annotations and utilities to Quarkus test equivalents. Converts @SpringBootTest to @QuarkusTest, @MockBean to @InjectMock, etc.

org.openrewrite.quarkus.spring.MigrateSpringTesting
mod run . --recipe=org.openrewrite.quarkus.spring.MigrateSpringTesting

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Change Gradle or Maven dependency org.springframework.boot:spring-boot-starter-test
  2. Add Gradle or Maven dependency io.quarkus:quarkus-junit5-mockito:x
  3. Change type SpringBootTest to QuarkusTest
  4. Change type MockBean to InjectMock
  5. Change type SpyBean to InjectSpy
  6. Remove annotation org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc
  7. Remove annotation org.springframework.test.context.ActiveProfiles
  8. Add Gradle or Maven dependency io.rest-assured:rest-assured:5.x