Spring Boot 2.1.3.RELEASE: unlike other XxxTest annotations, JsonTest isn't annotated with @ExtendWith(SpringExtension.class), and I haven't seen any indication in the documentation or the developer guide that it shouldn't be.

Comment From: wilkinsona

Looks like I missed this when I added @ExtendWith(SpringExtension.class) to all the @…Test annotations. Thanks for spotting and reporting it.

Comment From: hayworks

I am using spring boot 2.2.6 and. it. still gives me the error:

Suppressed: java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test

Is it certain for @JsonTest that it is fixed?

Comment From: snicoll

@hayworks that exception is a confirmation that the extension has been applied. A suitable @SpringBootConfiguration (i.e. @SpringBootApplication) was not found in the hierarchy and therefore the test context can't start properly. Please refer to the reference documentation and follow-up on StackOverflow if you have more questions.