Closed maelle closed 3 years ago
nice. one way maybe one could achieve the goal here is to run tests that use vcr, but turning vcr off with those env vars so that the same tests that use fixtures do real HTTP requests instead. but maybe there is some other approach that would be better, or at least better for some use cases
yes I think that's the simple contract test.
I wonder whether with vcr, there could be some sort of tool for more easily exploring the difference between new and previous versions of cassettes when one re-records (similar to what one gets with testthat's snapshot testing).
Possibly. Probably only if they go through a vcr function that we make so we can move the old cassette to a temporary folder, then after creating the new one, be able to compare the two.
notes about httptest and presser. if you write your mock files / response content by hand, not that easy to re-record/see if the API output changed. :thinking:
h/t https://www.martinfowler.com/bliki/ContractTest.html