spring-projects/spring-boot

Consider deprecating TestRestTemplate in favor of RestTestClient

Opened this issue · 2 comments

As of spring-projects/spring-framework#34428, Spring Framework has a RestTestClient that aligns with WebTestClient. It supports testing real servers using RestClient as a transport, but also testing mock setups with MockMvc. Assertions and features are aligned with the latest in Framework (like API versioning).

We should consider whether we should deprecate TestRestTemplate as a result.

Assuming it's equivalent and ready for replacement: If this is just a simple deprecation accompanying the API/class migration, let me know. This should be manageable. Thanks.

We will have to tackle this by Spring Framework 7.1, because RestTemplate itself will be deprecated by then.