3. Write and verify a real Pact
The hardest thing about setting up Pact in any company is getting buy in from all the teams. Everyone needs to be on the same page to make Pact work.
A good way to determine if Pact works for you is to write and verify a pact for a real consumer and provider.
- Write a Pact test in your consumer project (consult the documentation for your chosen language) and generate the pact.
- Ship the pact file to the provider team - it still doesn’t matter how yet, we’ll get on to that in the next step.
- Verify the pact against the provider (again, consult the documentation for your chosen language)
- Talk about it.
- Decide whether or not Pact is the right tool for you, taking into account that there are situations for which Pact is a good solution, and situations for which Pact is not a good solution.