-
Notifications
You must be signed in to change notification settings - Fork 217
Development workflow
bethesque edited this page Jul 24, 2014
·
7 revisions
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.
- Write consumer tests with pact
- Implement consumer
- Add
pact:publishtask to consumer build or publish pact as CI artifact - Create provider project
- Configure pact:verify task to point to latest published pact
- Implement provider until
pact:verifypasses
- Add new feature, with pact specs, to consumer project on a new feature branch.
- In the provider project, use
rake pact:verify:at[/path/to/pact/on/branch]to verify the new pact. - Commit/release new provider feature.
- Merge consumer branch into main development branch.
This may seem complex, but it is actually sufacing the underlying reality, that you cannot add new functionality to the consumer before it can be supported by the provider, and that the functionality that the provider supports should still be driven by the needs of the consumer.