-
Notifications
You must be signed in to change notification settings - Fork 23
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
Addition of tests to check build status #8
Comments
I'll write the tests for the current core functionality. |
hey @Milind220 can i take this off your plate? |
@Sam-damn Hahaha sure I've been meaning to get to this for quite a while now, but been bogged down with work. Have fun working on it - After it's complete we can open a new issue to connect the tests to a continuous testing workflow so that you can learn that too! |
Great! very excited for this :) |
@Milind220 a little update on this, i have been planning how to do the tests and i decided that we should be mocking the API request calls because of the following reasons :
PS : by mocking i mean creating artificial request responses that we know should produce certain functionality from our methods and we patch (intercept and replace) any requests made inside our methods with those mock objects (artificial responses) to test the behavior of said methods. However having said that, we should definitely include a test to check whether our URL endpoints are exactly what they should be because possibly (in the future) some contributor might change one of those URLS and in that case if it goes unnoticed , it should be picked up by our tests. And one last thing i have been reading a little bit on the subject of testing private methods or more accurately "internal methods" methods which aren't made to be used by a consumer of ozone, methods which are used internally by other methods , like I will still of course provide tests for the private methods , but i would like to hear your opinion on this, since the general consensus seems to be that only public methods (ozone API) should be tested and not private methods, and i realize that this isn't an iron clad rule which fits all cases , there are always exceptions but it does seem to be a general guideline. i will be making a pull request soon after i do the rest of the tests where we can discuss this further, but for now i would like to hear your opinion on all of this :) |
@Sam-damn
Thanks for working on this! Your points all made a lot of sense. Can't wait for us to have a continuous testing system for Ozone! |
Looking forward to your PR @Sam-damn :) |
@Sam-damn Hey! Are you still working on the unit tests? We definitely need this asap, so let us know if you're too busy to work on it |
@Milind220 i apologize i got a a little busy with job , i think it would be best if someone else is assigned to this. |
I'll take this and try. Hold my beer, I got this. |
@lahdjirayhan Tried the tests! they work perfectly :) Can you confirm that you also get this output? |
@Milind220 Yes. This is my output:
We can incrementally work towards making all the tests pass. |
The package currently has no test coverage at all. There is thus no method of checking build status with CI/CD.
The core functionality at least should have test coverage.
The text was updated successfully, but these errors were encountered: