-
Notifications
You must be signed in to change notification settings - Fork 344
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
Improve unit test coverage #952
Comments
Sounds good. Since this might be a bit of an epic, let's create a checklist in the issue description to serve as a roadmap. The checklist can be split off as separate tasks, if needed. |
Can I just start or would you assign this to me please. |
@wassafshahzad as requested, I assigned you. Please create a checklist of models and views without test coverage so we can tackle this issue as an epic. For models, we don't need to unit test Django core functionality, such as whether field definitions work correctly, so just add models where we have added or shadowed methods. For views, use your discretion as to what needs to be covered by unit tests and what those tests should look like (i.e. what conventions we should follow.) |
Thank you for assigning me the issue I will start working on it. |
@brylie where can I find the progression of unit testing? Did you specify conventions for testing, as you mentioned? I want to contribute to the project with testing and coverage. |
I believe we should follow the basic conventions outlined in the Testing in Django documentation. Perhaps we can start with a test coverage auditing tool to get a sense of where tests are most urgently needed. |
First, we need to create community chat, as discussed in issue #921. I want to contribute to the project. Nonetheless, I see a lot of issue that is assigned to someone, but it's been inactive for a long time, just like this thread. Now I try to understand the project itself, then we can collaborate on the project. :) |
Related to this task, I added a "Task" list to this issue description with some concrete steps to move forward. I really appreciate your interest in helping out with CiviWiki development 😃 |
I use Actually, it seems a little bit confusing so if you want I can add HTML templates from coverage to examine carefully by creating a new branch to commit HTML files from coverage. I should also add that
|
Thanks for sharing the audit report, @gorkemarslan. Where would you suggest initial improvements be made? Also, would you be willing to open a pull request that improves test coverage of one of those files? |
sorry I was inactive on this task, I am currently looking over another issue. Could we divide this into multiple sub tasks on the bases of apps ? |
@brylie I would like to get started with Another point, we should separate Maybe we should start a new issue for the maintenance? |
That sounds like a great place to start.
Yes, great idea! Please open a separate issue so we can track that work independently of the unit testing. |
Right now, I am dealing with creating a new issue for it. Then we can discuss tasks and steps in there. |
Let's get the test coverage report to run as part of pull requests. What do you recommend? |
We could use github actions for that |
This link might help us. Or we can add |
@brylie, is it possible to pin one of my test coverage reports to the top of this issue? I can constantly upload the coverage report when a new PR improving test coverage until a desired result is achieved? |
@gorkemarslan create a new discussion thread and paste your coverage report there: You can then edit your comment as the coverage changes. |
Hello, I would like to take a shot at this. Do we still need more test cases to increase coverage? |
We currently have relatively low unit test coverage of our backend python code. This makes it very difficult to ensure that changes we are making don't break existing app functionality, or that new functionality behaves the way we expect.
We should add some unit tests using the
django.test
package, to improve test coverage.Once we have some coverage we can work on setting up a CI pipeline that would run the tests on each PR, and could also report on overall test coverage.
Current test coverage
Task
Initial report
I plan on following this guide, but am open to suggestions of alternative unit test frameworks.
The deliverable for this ticket is to set up the test framework and write one test. Additionally the assignee should create another issue that outlines a plan to increase unit test coverage across the project.
The text was updated successfully, but these errors were encountered: