News for hackers. Stuff that matters.
Re:Tips to prevent adoption of your API by ryansouza on Wednesday June 16, 2021 @01:56PM (#27531460)
The unit under testing could be the API interaction. If I wrap an external API in a client library I would test it’s behavior before then mocking that out when testing other code that uses the library.

I think situations like external API hit a fuzzy line between unit/integration. For testing an API unit I would reach for some way to save, re-play, and re-record those interactions just for sanity sake.

To me an integration test would be multi-step behavior, not just testing a specific request does a specific thing but a chain of requests, or verifying side-effects.

There are no comments on this comment yet.