Skip to content

Common API for MockMvc tests and for real HTTP tests #19647

@spring-projects-issues

Description

@spring-projects-issues

Neil S opened SPR-15081 and commented

There seems to be no common API which can be configure to do mock HTTP tests as well as real HTTP tests.

MockMvc tests suffice during development but for production deployment projects might like to do a complete end-to-end integration test by run real tests against a the (maybe embedded) container sever which will be used in production.

At the moment that means writing the same tests twice using the MockMvc and then TestRestTemplate+assert APIs.

IMHO MockMvc has the friendlier API which results in concise and easier to read test code.


Affects: 4.3.5

Issue Links:

0 votes, 6 watchers

Metadata

Metadata

Assignees

Labels

in: testIssues in the test modulein: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions