WireMock reposted this
Some tests are really hard to create…so we don’t, because we don’t have time. This is particularly true in heavily integrated systems - when your test depends on a bunch of external services each of those must have the right data available and respond predictably in the way you need them to. For example: → When you need a particularly large data set to be returned you’re stuck trying to figure out a way to insert hundreds of records into someone else’s database. → When you need the API to return a particular error case, and it won’t happen without you actually breaking part of the system. These tests that end up being too expensive to be worth it… unless you simulate the APIs. A key benefit of API simulation tools is that it doesn’t matter how you want that external API to respond, the effort of setting it up will be basically the same. And this means and we can focus on the testing that’s most valuable, rather than merely the easiest.