@IfProfileValue not working with JUnit 5 SpringExtension
问题 I use junit5 with spring-starter-test, in order to run spring test I need to use @ExtendWith instead of @RunWith . However @IfProfileValue work with @RunWith(SpringRunner.class) but not with @ExtendWith(SpringExtension.class) , below is my code: @SpringBootTest @ExtendWith({SpringExtension.class}) class MyApplicationTests{ @Test @DisplayName("Application Context should be loaded") @IfProfileValue(name = "test-groups" , value="unit-test") void contextLoads() { } } so the contextLoads should be