-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
Auto-generate tests for client APIs #9
Comments
…ints #9 Auto-generate tests for client APIs
Now that https://github.com/dblock/slack-ruby-client/pull/53 introduces minimal expectations around Web api endpoints we could go further. With specs we want to ensure that we didn't break anything accidentally, so I imagine generating specs that actually call the API and expect a VCR cassette replicating a certain basic behavior. We would generate such specs and run them once with an API token, then next time when we re-generate the specs as the API is updated we run with the old K7 and see what broke. The question is, of course, whether this is useful vs. the effort to implement it. |
I'll try to implement it. |
Should we add responses of methods to https://github.com/dblock/slack-api-ref for matching correctness of responses from API? |
Not sure. I wouldn't test the Slack API implementation :) |
So, it's difficult to generate such cassettes, because they must to be very individual for each method. |
@accessd Makes sense. I wouldn't spend too much time on this. Tests for generated code are important only for the sake of ensuring that we "see" API changes. When someone runs the rake task to update the API, and something used to work and now doesn't would resurface. We don't want to test the actual Slack API, etc. |
We generate endpoints, should also generate tests that have bare minimum expectations around these.
See https://github.com/dblock/slack-ruby-client/pull/8.
The text was updated successfully, but these errors were encountered: