ropensci / openalexR

Getting bibliographic records from OpenAlex
https://docs.ropensci.org/openalexR/
Other
100 stars 21 forks source link

Use vcr for testing #83

Open trangdata opened 1 year ago

trangdata commented 1 year ago

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

maelle commented 1 year ago

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