Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use vcr for testing #83

Open
trangdata opened this issue Mar 1, 2023 · 1 comment
Open

Use vcr for testing #83

trangdata opened this issue Mar 1, 2023 · 1 comment

Comments

@trangdata
Copy link
Collaborator

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
Copy link
Member

maelle commented Mar 10, 2023

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: cynkra/fledge#646)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants