Hacker News new | ask | show | jobs
by ironSkillet 2055 days ago
What are some techniques you use to test business use cases in a code independent way?
1 comments

You'll want to test against stable API/ABI, and use positive and negative testcases. The problematic parts are mocking, simulation and how tests affect the codebase.
> You'll want to test against stable API/ABI

Good luck with that. lol.

- The only stable APIs I've seen, if an API exists, are production financial APIs, because money is involved.

- DynDNS has been knows to change input and output parameter types, breaking calls

- Even Twilio has changed a fundamental API path (!) in the past couple of years, breaking SMS API calls in 2019

- Facebook only supports API version N and N-1. Hope you're not on N-2 and there's a sudden version bump!

(I say production APIs, since even payment gateways often have flaky dev/qa gateways that you can't reliably do automated tests against. Past companies that I worked at had to test against prod gateways with their own personal credit cards.)

Otherwise, if you want an API, ensure you choose a product/partner that offers/supports one.