Page MenuHomePhabricator

Write unit tests for WikimediaApiPortal
Closed, ResolvedPublic

Description

Add unit tests to support the functionality in the WikimediaApiPortal skin

Event Timeline

I would argue that the priority of this task should be high. We are running new code with zero test coverage in production cluster. We are trying to increase coverage for old code, and adding new code to the problem is not really acceptable. Plus, as the time passes it's going to get harder and harder to provide appropriate coverage as the context of all the lines of code is getting washed away.

Change 623651 had a related patch set uploaded (by Ppchelko; owner: Ppchelko):
[mediawiki/skins/WikimediaApiPortal@master] Demo: Add tests for Skin and for Template

https://gerrit.wikimedia.org/r/623651

WDoranWMF raised the priority of this task from High to Unbreak Now!.Sep 10 2020, 3:25 PM
Pchelolo lowered the priority of this task from Unbreak Now! to High.Sep 10 2020, 7:27 PM

Unbreak now is too much for this, it's used for production issues affecting users en mass, this definitely doesn't qualify.

This will require some refactoring to make the code more testable.

Change 630318 had a related patch set uploaded (by Cicalese; owner: Cicalese):
[mediawiki/skins/WikimediaApiPortal@master] WIP: Refactor to facilitate writing unit tests.

https://gerrit.wikimedia.org/r/630318

Change 623651 abandoned by Cicalese:
[mediawiki/skins/WikimediaApiPortal@master] Demo: Add tests for Skin and for Template

Reason:
Incorporated into Ia7c434ecfc805d299703c2f43c08c23822f59683.

https://gerrit.wikimedia.org/r/623651

Change 630318 merged by jenkins-bot:
[mediawiki/skins/WikimediaApiPortal@master] Refactor to facilitate writing unit tests.

https://gerrit.wikimedia.org/r/630318

apaskulin moved this task from Doing to Done on the Platform Team Workboards (Green) board.

Verified on beta. Tracking two resulting issues in separate tasks (T265413 and T265408). Thanks, Cindy!