[LRUG] VCR caches

Mark Burns markthedeveloper at gmail.com
Tue Sep 11 03:05:38 PDT 2018


Generally I think people tend to test HTTP services at the wrong
abstraction. So it might be why it’s a pain point for you. Your non http
related test code ends up having to know about http (via VCR or web mock or
whatever).

It might be easier for you to wrap your services in a gem or library and
inside that library thoroughly test the HTTP interactions.

Then outside of the library avoid the leaky http abstraction.

I’ve seen and done it myself so I wrote a post about it a few years ago.
It’s probably a bit dated now.

http://blog.polyglotsoftware.co.uk/2014/02/07/a-pattern-for-stubbing-out-apis-with-rspec.html

(Apologies in advance if you are not making this same mistake)
On Tue, 11 Sep 2018 at 10:44, Samuel Joseph <tansaku at gmail.com> wrote:

> Hi Lrugers,
>
> Any thoughts on how to manage VCR caches effectively in a team context?
>
> https://github.com/vcr/vcr
>
> We have a few open source projects using VCR, and we have the recordings
> of the network communication checked into git so that all developers can
> run tests in a consistent network environment.
>
> I have two concerns
>
> 1) new developers onboarding often get snarled up in the caching and the
> files generated
> 2) the cached recordings are gradually getting further and further out
> of date - could we automate their refreshing?
>
> I have reached out to the VCR community in the past, but haven't had
> much feedback:
>
> * https://github.com/vcr/vcr/issues/672
> * https://github.com/vcr/vcr/issues/719
> * https://groups.google.com/forum/#!topic/vcr-ruby/8DoA7MUq-38
>
> I wondered if anyone else was using VCR and how they were making it work
> well for them with their team.  Perhaps people are not using it and
> doing something else?
>
> Many thanks in advance
>
> Best, Sam
>
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> Archives: http://lists.lrug.org/pipermail/chat-lrug.org
> Manage your subscription: http://lists.lrug.org/options.cgi/chat-lrug.org
> List info: http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20180911/7f182b75/attachment-0002.html>


More information about the Chat mailing list