-
Notifications
You must be signed in to change notification settings - Fork 72
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
Regenerate all test fixtures #294
Comments
vcr does have the |
Yes, but unfortunately I as a maintainer can't update many (maybe even most?) of the cassettes because I don't have access to those API features. |
Got it, okay |
I agree that the cassettes for existing tests should probably be re-generated regularly, but I have the same issue with feature availability. How does Qualtrics itself view open-source support tools like ours? Assuming they view our existence at least somewhat positively, perhaps someone there would be open to giving us a full-featured account just for testing? |
Referencing #297, which brought to mind an additional challenge here: We currently have the situation where all the recorded tests use "www." in the credentials so as to not to be bound to a particular datacenter (and also so it doesn't expose anything about the accounts individual developers rely on for their work). This actually comes about manually after test generation: the vcr fixtures for individual tests are first generated using some specific developer's datacenter ID, then converted after the fact to "www." in both the test R code and fixture YAML. Obviously this won't easily work with any kind of regular test regeneration scheme, automated or otherwise. Realistically we'd probably need something like a package-linked Qualtrics account that contains all the surveys used for tests, or at least someone willing and able to do that with their existing account. |
Looking at the docs, I'm seeing a "mock server" for each endpoint (example ) located at their API dev platform stoplight.io. Could that be useful here somehow? |
@jmobrien Oh maybe! That would be a really high impact thing to check out. If that is something that it is OK to ping during CI, then we could feasibly rip out all the vcr/etc from the package and run tests against that mock server on CI, skipping everything that uses the mock server on CRAN. |
Right. I wasn't even thinking ahead quite that far, but it does make sense that we could really simplify tests that way. After a few tests looks like the mocking server doesn't care about API keys, and also will accept basically anything that looks like a proper survey ID in the request (or, presumably, some other form of ID). Not sure about whether/how additional paramters are respected (e.g., not sure whether requesting a QSF from get survey does anything). So, maybe some caveats, but I think this has real potential. If we use this, the biggest challenge might be to rework the internals around URL building somehow, since the mocking URLs aren't even in the ballpark of what the endpoint URLs look like currently. But it might still be worth it. |
In #350 I started on moving from vcr to using Qualtrics' mock servers, removing the need for 4 vcr fixtures. So far so good! |
I had to do a CRAN release today and found that some/most of the mock servers are returning 500s so I did |
In ropensci/vcr#255 @sckott suggested it is good practice to regenerate all the test fixtures on occasion. We definitely have not done that, mostly because I (the maintainer) don't have access to many of the features we have tested. These fixtures were created by the individuals who did the original PRs (so involve their surveys).
What is the best way forward from here?
The text was updated successfully, but these errors were encountered: