You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using consumer driven contracts enables you to reverse the "normal" order of development, allowing you to build your consumer, in its entirety if need be, before you build your provider.
The development process will be different for every organisation, but this is one that has worked for the pact authors.
Initial development
Consumer - Write consumer tests with pact
Consumer - Implement consumer
Consumer - Make pact available to provider project.
Provider - Create provider project
Provider - Configure pact:verify task to point to latest published pact
Provider - Implement provider until pact:verify passes
New features
Consumer - Add new consumer feature, with pact specs, on a feature branch.
Consumer - Talk to the provider team about the new functionality that is required, and give them access to the pact with the new features.
Provider - In the provider project, use rake pact:verify:at[/path/to/pact/on/branch] to verify the new pact.
Provider - Develop and release new provider feature.
Consumer - Merge feature branch into main development branch, and publish new pact.
This may seem complex, but it is actually surfacing the underlying reality, that 1. you should not be committing functionality to the master branch of the consumer before it can be supported by the provider and 2. that the functionality of the provider should still be driven by the needs of the consumer.