openalexR icon indicating copy to clipboard operation
openalexR copied to clipboard

Use vcr for testing

Open trangdata opened this issue 2 years ago • 1 comments

We currently make a few API requests to OpenAlex for testing in our GH Actions, which is triggered by each commit to a PR. A more graceful way to test would be to use vcr to "record" the cassettes of the responses and have one scheduled workflow once a week using real requests.

https://books.ropensci.org/http-testing/vcr.html

trangdata avatar Mar 01 '23 22:03 trangdata

or hpttest. if you use httptest and then switch from httr to httr2, the switch from httptest to httptest2 is not too complicated (I had the experience of doing this myself this week: https://github.com/cynkra/fledge/pull/646)

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

maelle avatar Mar 10 '23 09:03 maelle