Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Consumer driven contracts

56 vues

Publié le

This presentation explains why we think consumer driven contracts is an interesting approach, by contrasting it with provider and contract driven.

This presentation was used as an introduction of a session that also practically demonstrated how to do this in Pact. This was used on. Agile Tour Brussels 2018, Agile Tour Lille 2018, Socrates Belgium 2018 and several meetups.

Publié dans : Logiciels
  • Soyez le premier à commenter

Consumer driven contracts

  1. 1. Consumer driven contracts The evolution of your APIs supported by tests wemanity @nelisboucke @matteo_pierro
  2. 2. A typical situation • Several teams in a company need to integrate an API • New functionality ProviderConsumer Consumer Contract …
  3. 3. How does the cooperation go?
  4. 4. Provider driven • Provider builds API as they see fit • Often just expose all info • Consumer starts when provider is ready Provider Contract Consumer Consumer …
  5. 5. Challenges for in our situation • Often too complex to achieve normal flows https://upload.wikimedia.org/wikipedia/commons/thumb/d/d6/STS120LaunchHiRes-edit1.jpg/1024px-STS120LaunchHiRes-edit1.jpg
  6. 6. Challenges for in our situation • Ping-pong to make it work • Never perfect fit for consumers • Lots of waiting, bugs, interrupts to test, …
  7. 7. Challenges for in our situation • Late feedback from end users
  8. 8. Good for • API is (part of) the product • Lots of (unknown) consumers • many opportunities to collect feedback • Budget for multiple iterations on the API
  9. 9. Contract driven • Meeting to agree on the complete API in advance • Build in parallel, use mock or stub • Integrate at the end Provider Contract Consumer Consumer …
  10. 10. Challenges in our situation • Analysis paralysis + Contract negotiation over cooperation!
  11. 11. Challenges in our situation • Most of the time details where not agreed on, so still mismatches
  12. 12. Challenges in our situation
  13. 13. Challenges in our situation • Integration near deadline
  14. 14. Good for • When you know what you need • e.g integration with existing system and datamodel • Working with a (external) party where you want to protect yourself • At least it is clear what to expect
  15. 15. Consumer driven • Short meeting to agree on basic structure of API • Consumer iteratively builds + shares expectations • Provider iteratively builds + verifies with expectations Provider Contract Consumer Consumer …
  16. 16. Why is it good in our situation? • You do not exactly know what you need • Limited and known consumers • You want to integrate fast • Fast feedback • Reduce integration risk
  17. 17. Challenges • Tools needed to make it easier
  18. 18. Challenges • Provider needs to adapt WoW to incorporate consumer changes
  19. 19. Challenges • Consumer needs to work test driven and share expectations
  20. 20. Overview of Pact way of working
  21. 21. Implement location promotion
  22. 22. CI + demo
  23. 23. Topics to discuss? • VS swagger and wire mock? • What if something goes wrong? • Demonstrate how works with CI in this case • Versioning? • Challenges on implementing this in your team(s)? • Way of working a provider side? • Incident?
  24. 24. Who are we? Nelis Boucké Matteo Pierro @nelisboucke @matteo_pierro