Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • 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: 130
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.
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic