Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Contract Testing - bye-bye Testing Monolith?

30 views

Published on

My talk on Contract Testing which I gave on the European Testing Conference 2019

Published in: Software
  • Be the first to comment

  • Be the first to like this

Contract Testing - bye-bye Testing Monolith?

  1. 1. Source: time.com CONTRACT TESTING
  2. 2. W H AT TO E X P E C T ?  No code  No tools  How it can help you  Some practices Source: wallpaper21.com
  3. 3. A B O U T M E  Maarten Groeneweg  Portbase  Tester & Guild lead  @LazyTesting
  4. 4. WE HAVE A PROBLEM
  5. 5. E2E MONOLITH Source: pinterest.com
  6. 6. MONOLITH PIPELINE App E2E Tests Feature team 1 Feature team 2 Platform team Production
  7. 7. E2E Tests App App App App App App App App App Feature team 1 Feature team 2 Platform team MICROSERVICE PIPELINE Production
  8. 8. A REAL MICROSERVICE PIPELINE App Tests App App App App App Tests Tests Tests Tests Tests Feature team 1 Feature team 2 Platform team Production
  9. 9. REAL MICROSERVICES IN PRODUCTION App App App App App App App App App Source: wikia.com
  10. 10. Source: theglobeandmail.com
  11. 11. THE SOLUTION
  12. 12. C O N T R A C T T E S T I N G  Kills integration bugs  Does not harm your microservices  Enables autonomous delivery Source: therange.co.uk
  13. 13. STEP 1: CREATE CONTRACT All-the- beers-app Beers API /beers Consumer Provider Contract When: GET /beers Then: [{ name: 'Kaapse Harrie', brewery: 'Kaapse Brouwers'}]
  14. 14. STEP 2: TEST CONSUMER AGAINST MOCK Contract Beer API Mock All-the- beers-app Test Consumer
  15. 15. STEP 3: VALIDATE CONTRACT Contract Contract Contract Beers API Provider When: GET /beers Then: [{ name: 'Kaapse Harrie', brewery: 'Kaapse Brouwers'}]
  16. 16. MICROSERVICES PIPELINE TestsConsumer Provider Tests Consumer tests Provider Mock Contract Ok Provider tests Production Production
  17. 17. A DVA N TA G E S  Autonomous testing  Consumer driven contracts  Enables provider to optimize  Insight in usage Source: techtimes.com
  18. 18. 7 ANTI- PATTERNS
  19. 19. #1: THE DICTATOR Source: inrealdeep.com
  20. 20. #2: THE TOOLIST Source: wjs.com
  21. 21. #3: HAPPY PATH COVERAGE Source: reddit.com
  22. 22. Source: imgflip.com
  23. 23. #5: THE NAYSAYER Source: riseandshine.com.sg
  24. 24. #6: THE COMPLEXITY COMPLEX Source: hbr.org
  25. 25. #7: THE LEAKING PIPELINE Source: thespruce.com
  26. 26. CONCLUSION
  27. 27. I T ' S A W E S O M E  Autonomous releasing  No testing monolith  Insight in integrations  But don't forget the humans Source: Futurama
  28. 28. M O R E I N F O  lazytesting.com/contract- testing  @LazyTesting

×