I have been playing with Spring Cloud Contracts. Here is my understanding of the workflow thus far.
On the server Side
- Write the contract (in groovy or yaml)
- Auto generate the tests (using gradle plugin)
- Setup BaseClass that does appropriate setup setups for the Controller
- Run the auto generated Tests
- Publish the stubs jar file that is generated to some local repo (which contains wiremock server built in, with request/responses)
On the client side
- Download the stub jar file
- Write tests against this stub jar. Use stubrunner to verify responses
What I fail to understand is how is this Consumer driven? The contracts seems to originate from the producer, the consumer seems to be passively testing what the producer has published (using stubs jar file). A producer could accidentally not update the contracts, but make breaking changes. This can lead to tests on the client passing even though it should have failed. Is this true or have I misunderstood a step where the contracts are created from the consumer side
Thoughts?