February 2018
Intermediate to advanced
406 pages
9h 52m
English
Your external-service testing story has two main characters:
The client, the part of your application code that uses the external API, either because it needs data accessible via the API or because it’s sending data to the API to be used by somebody else. In either case, you’re dealing with a request and a response, even if the response is just a status code.
The server, which for our purposes here is outside your application and reachable via some kind of network request (though many of the strategies in this chapter also apply even if the service isn’t separated by the network).
I also introduce two characters to the story for design and testing purposes:
A fake server, which intercepts HTTP requests during a test ...