Page MenuHomePhabricator

Display extension test coverage in infobox
Open, Needs TriagePublic

Description

Displaying test coverage in the extension infobox would be useful both for motivating developers to write tests and for making it easier for users to decide which extensions are high-quality (although for that it would be nice to ensure that the tests are actually passing for master...).

For now it can be done on top of T155029#4185415.

Event Timeline

straw-man proposal:

  • Update the existing Toolforge tool (which already charts coverage for extensions), to write this data to mediawiki.org as a Lua module table (e.g. data points limited to last 30 days). (Or as JSON dataset on Commons?)
  • On mediawiki.org, write a Lua module that, given an extension name, can display a singlestat number for the "current" code coverage percentage, with behind it a thin line graph with how it changed in the last month.
  • On mediawiki.org, use this in the Extension infobox template.

I would keep tools mostly single-purpose: have the coverage tool expose the data as a JSON API (where API probably just means writing it to a JSON file and making it accessible) and have the extjsonuploader tool deal with pushing it on-wiki along with the other extension data.

When MCR fully lands, we can probably replace Lua with something nicer.

have the coverage tool expose the data as a JSON API

Filed as T221510: Provide list of repos with coverage information in machine-readable format. For now extjsonuploader just replicates the logic (which is fairly simple).

Change 505432 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[labs/tools/extjsonuploader@master] Fetch coverage data

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