3 ms·
I've been using ephemeral_response[1] in Ruby, there may be a similar library in whatever language you're working with. The idea is that it makes one real call
by jdminhbg 16y ago
I've been using ephemeral_response[1] in Ruby, there may be a similar library in whatever language you're working with. The idea is that it makes one real call to the service and caches it for a specified amount of time as a fixture. That way you don't constantly make calls against e.g. the Twitter search api, but when they change how it works in 6 months, your test will fail.
[1]: https://github.com/sandro/ephemeral_response https://github.com/sandro/ephemeral_response
- jjrumi 16y agoI don't know if ephemeral_response solves this, but the first thing that comes into my mind is caching an error (webservice doesn't respond in time or whatever). This happened to me some times. Caching the error is a big problem when you have a system that determines if your code is stable or not and blocks deployments in production to prevent errors.