-
Notifications
You must be signed in to change notification settings - Fork 2
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
Tests #43
Comments
@xbony2 and @APerson241 Do you guys have any ideas for this? I still would very much like some unit testing going on in this lib. |
What do we need tests for again? ;) |
... So we can ensure that everything is working as expected, and so we don't get stupid errors because we forgot to manually test one method when changing an API. |
There must be some way to set up a kinda-sketchy local scaffolding-style MediaWiki instance, right? Short of that, I think mocking all the things is acceptable for testing passing stuff through and processing |
^ Furthermore, setting up a local latest-version MW instance (Travis ci?) would ensure that we don't have problems with breaking API changes. |
We could also use VCR to record actual API responses and test against those |
Right now, we don't have tests for any methods that do any HTTP stuff. This is kinda blargh. I would really enjoy having all of our methods have associated tests, so we don't have stupid errors like #34.
My only issue is I don't know how we should actually make these tests. We could use mocks, but I don't particularly enjoy using mocks for this kind of thing because you end up testing that you set up your mocks correctly, and not that you interact with the API correctly. Some other libraries, like the MediaWiki-Bot Perl library uses one of the many test Wikipedias to perform unit testing. Obviously, internet connection issues can result in errored builds, which is not so great.
The text was updated successfully, but these errors were encountered: