Skip to content

Remove Hamcrest dependency from RestTestClient #35702

@rstoyanchev

Description

@rstoyanchev

Hamcrest has been used to provide flexibility for value matching in MockMvc since 3.2, and was later replicated in WebTestClient in 5.0, and the same is now in RestTestClient for 7.0.

This serves its purpose, but remains basic and limited after all this time, especially when compared to AssertJ, which is widely accepted, established, and continues to evolve.

More recently in 6.2 we introduced MockMvcTester for AssertJ support with MockMvc. This reflects a more current direction, and we'll follow the same for RestTestClient with #35701.

In the mean time we are going to remove Hamcrest methods in RestTestClient, which can also cause classpath issues such as #35666 when Hamcrest is not on the classpath.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions