• 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
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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.
 
You're not going crazy. You're going sane in a crazy word. Find comfort in this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic