-
Notifications
You must be signed in to change notification settings - Fork 31
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
Policy re: examples and tests #36
Comments
This is all really ugly, you're right. What I really would like to get right is testing the paths that require authentication. I have thought of using some of Hadley's infrastructure for testing using private tokens via encrypted key-value pairs on the travis configuration file, but I haven't tried that yet. RGithub's develop branch needs merging, but it has the travis configuration file. The idea would be to get an authentication token by decrypting the values in Travis, and then running real tests against GitHub's API ( These would necessarily be slow, but the only alternative that I can think of is mocking the entire GitHub backend. (That's impractical, of course.) I really don't know how people write test suites for API wrappers, to be honest. What do you think? |
I am working on a package to wrap the Google spreadsheets API (or rather, someone working for me is doing the grunt work 😄 ) and we are confronting many of the same issues. This was just a probe to see if you had some pre-existing master plan 😄 I don't have any real answers either. But I do propose not waiting for the glorious but complicated stuff you describe above to start adding tests. What if I just started to gradually put in tests where possible, i.e. where authentication is not needed? I have done some informal testing of my own using a test Organization, because my current crisis is a need to create many Teams and repos and create associations between them. Seems like GitHub needs some dummy repos and Organizations and users where you can count on various properties and build tests around querying them! Won't help for creating repos, Teams, etc. though. |
That would be enourmously helpful. |
API wrapping packages present headaches in terms of runnable examples and tests. They can be slow and there are myriad reasons why they might not work, that don't necessarily reveal a fundamental problem.
Do you have any Big Picture "policy thoughts" before I even contemplate adding examples to function docs or putting some real tests in?
The text was updated successfully, but these errors were encountered: