+1 for Bypass
-10 for any kind of mocking in this case
Bypass allows you simulate a real interaction at the TCP/HTTP level with a fake server. That’s what I personally need in order to have piece of mind when testing a client library for a remote service. A few advantages:
- You’re testing the nitty-gritty details of your HTTP request. Consider for example authentication, content encoding/decoding, special headers that may be required etc. You can simulate all of this using plugs in Bypass, ignoring all the details of whatever HTTP client library you’re using (your remote service doesn’t know about it, either)
- As a consequence, if you later on decide to swap your HTTP client library with something else, your tests don’t need to change






















