webchem icon indicating copy to clipboard operation
webchem copied to clipboard

vcr demo

Open maelle opened this issue 5 years ago • 5 comments

following discussion with @stitam

maelle avatar Oct 13 '20 13:10 maelle

Hey @stitam, I used vcr for tests in another project and have a decent handle on how it works. Are we still interested in implementing it for testing webchem? The downside is that changes to APIs won't cause our tests to fail (unless we keep some tests that query the API).

Aariq avatar Nov 02 '22 16:11 Aariq

Hi @Aariq, it takes forever to pass all the checks before merging a PR so I think vcr would be useful. To manage the downside, do you think e.g. manually rebuilding the vcr records every now and then would be feasible? I doubt this "every now and then" could be automated :/

stitam avatar Nov 02 '22 16:11 stitam

there is also {httptest} , alternatively. It's more actively maintained, and if you were to switch to httr2, switching your tests to {httptest2} would be easier than from {vcr} to {httptest2}.

maelle avatar Nov 03 '22 11:11 maelle

Maybe I'll try out httptest for my other, simpler, project and report back.

Aariq avatar Nov 03 '22 14:11 Aariq

For info https://books.ropensci.org/http-testing/httptest.html :innocent:

maelle avatar Nov 03 '22 14:11 maelle