Am I understanding the Contract Testing the right way?

I think Alexander has summed it up pretty well! But maybe to add a few more:

Pros:

  • It can prevent data providers and/or consumers from deploying broken changes to production via Pact’s can-i-deploy tool
  • It can serve as an additional source of truth and documentation for the team
  • It eliminates the need of having a dedicated test environment with all the integrated services

Cons:

  • Doesn’t work well with public APIs where the consumers are not known
  • Only works best if the APIs are created in house. Doesn’t work well with third party APIs
5 Likes