The test modules know about everything at the moment and we'd like to modularize them

Comment From: wilkinsona

As part of this, we may want to consider the location/name of @DataJpaTest. It's in org.springframework.boot.test.autoconfigure.orm.jpa at the moment but it auto-configures Spring Data JPA repositories. Perhaps it should move to a data.jpa package?

Comment From: wilkinsona

Re-opening as this isn't quite right. TestRestTemplate is now in spring-boot-restclient-test but the purpose of that module is for testing code that uses RestClient (or RestTemplate). TestRestTemplate is used for testing server-side logic over HTTP which is why it used to live in the (now gone) spring-boot-webserver-test. Perhaps:

  • spring-boot-webserver-test needs to be reinstated
  • TestRestTemplate needs to move back into spring-boot-test
  • something else

Comment From: philwebb

TestRestTemplate makes use of RestTemplateBuilder so it can't easily move to spring-boot-test unless we can break that link.

Comment From: philwebb

On a somewhat related note I think the package naming for the test clients quite hard. I went with org.springframework.boot.test.web.servlet.client and org.springframework.boot.test.web.reactive.client for the packages in spring-boot-test. Confusingly, Framework uses a mix of server and client. There's org.springframework.test.web.reactive.server.WebTestClient for reactive and org.springframework.test.web.servlet.client.RestTestClient for blocking.

Comment From: kzander91

I'm testing with the latest snapshots: * @AutoConfigureObservability is gone and was likely replaced by @AutoConfigureTracing, I was expecting that annotation to come in through spring-boot-starter-opentelemetry-test, but that starter is empty, it only pulls in spring-boot-starter-test. * @AutoConfigureJson is missing a corresponding .imports file, with the consequence that JacksonAutoConfiguration is no longer being imported in various test slices.

Comment From: wilkinsona

Thanks again for trying the snapshots, @kzander91. Those two have been addressed in 1706a7c and 2a2d3a8 respectively.