According to https://doc.wikimedia.org/cover-extensions/CheckUser/ we're just at 1%. It'd be good to increase it from time to time.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Dreamy_Jazz | T201154 Code coverage for CheckUser is very low | |||
Resolved | Dreamy_Jazz | T175920 Improve unit testing for CheckUser | |||
Resolved | Dreamy_Jazz | T315648 Fully test Hooks.php / HookHandlers | |||
Declined | None | T321864 Add CentralAuth to the gated extensions list | |||
Declined | None | T246038 Generate fake data for Special:Investigate testing | |||
Resolved | Dylsss | T310008 Checkuser API uses CSRF token name other than 'token' which results in testing issues |
Event Timeline
Totally agree. We had a similar situation in AbuseFilter as well and by moving some of the code around, we now have several new sets of tests (although it is still in the 20-30% range).
Is there a tracking bug for all of the code coverage tasks? If not, we should make one.
To expand just a little, we do have a Phabricator project at Test-Coverage , as on this task.
If there's anything I can do to help please let me know, although I have limited knowledge about this and some docs would be great in case I "dare" to help :) Thanks.
I aged myself again :) I will create a similar task for AbuseFilter and will use the right tag.
@Legoktm can you provide some insight as to how CoverMe data is sampled? I look at https://tools.wmflabs.org/coverme/?repo=Extension%3ACheckUser&type=all and I only see 1 call for each of the three functions listed. This is for which project and what time period?
Change 807224 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):
[mediawiki/extensions/CheckUser@master] Add test from the CentralAuth extension that tests the ServiceWiring
Change 807224 merged by jenkins-bot:
[mediawiki/extensions/CheckUser@master] Add test from the CentralAuth extension that tests the ServiceWiring
Change 854617 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):
[mediawiki/extensions/CheckUser@master] Test how the user provided limit affects the limit used by pagers
Change 854617 abandoned by Dreamy Jazz:
[mediawiki/extensions/CheckUser@master] Test how the user provided limit affects the limit used by pagers
Reason:
To avoid merge conflicts, will be adding this to I6e88ccb565da3d8103e7fbcfac965d401ec5a0ec.
Change 845732 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):
[mediawiki/extensions/CheckUser@master] Reduce code duplication, test, and assign class to each results type
Change 845732 merged by jenkins-bot:
[mediawiki/extensions/CheckUser@master] Reduce code duplication, test, and assign class to each results type
Code coverage is now at 45%, so I think the "very low" descriptor about the code coverage has been solved. Coverage should be improved as features are written and bugs are fixed, so I think this task can be closed as resolved.