• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Testing Java Microservices: Contract Tests for 3rd Party APIs?

 
Greenhorn
Posts: 11
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jason & Alex,

I see your book has a chapter on Contract Tests. Would you recommend writing contract tests (I'd guess Consumer Contracts) for APIs that are 3rd party, i.e., not controlled by my company? I'm guessing APIs like Twitter or Stripe, etc., aren't going to need it, but there are many small APIs that are consumed that might change in unexpected ways.

Thanks,
;ted

--
Twitter: @jitterted
 
Author
Posts: 134
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes! There’s certainly usefulness in that. Would you prefer to find out in testing or production that a third party changed their API? You could also contact the third party and offer your tests to them to let them know you expect this contract. If they know you’re using their service they’re more likely to let you know of changes. Certainly worth doing, especially if you don’t have an SLA (service level agreement) with them.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic