pact-foundation / pact-jvm

JVM version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
https://docs.pact.io
Apache License 2.0
1.08k stars 478 forks source link

integration with Spring Data REST #647

Open jorahood opened 6 years ago

jorahood commented 6 years ago

We have an app that exposes REST endpoints for a CrudRepository through Spring Data Rest so there are no Spring MVC controllers to pass to a MockMVC target. It would make our Pact testing easier (e.g., bypassing security, mocking the repository interactions) if we could run the Pact tests in a mockMVC environment rather than starting the whole application. I wondered if you have this kind of integration on your roadmap?

(I.e., the kind of integration Tom wondered about at the end of this blog post https://reflectoring.io/consumer-driven-contracts-with-pact-feign-spring-data-rest/)

uglyog commented 6 years ago

I'll need to understand how Spring Data Rest works, but I'm sure it should not be too hard to be able to make it work.

jorahood commented 6 years ago

Just wondering if you've given any more thought to this

jorahood commented 6 years ago

Just checking in again on this as it's a blocker for our adoption of Pact

uglyog commented 6 years ago

Could you provide an example project setup with Spring Data Rest?