Page MenuHomePhabricator

Display extension test coverage in infobox
Open, Needs TriagePublic


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

Tgr created this task.Apr 15 2019, 6:54 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 15 2019, 6:54 AM

straw-man proposal:

  • Update the existing Toolforge tool (which already charts coverage for extensions), to write this data to as a Lua module table (e.g. data points limited to last 30 days). (Or as JSON dataset on Commons?)
  • On, 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, use this in the Extension infobox template.
Tgr added a comment.Apr 15 2019, 9:22 PM

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.

Tgr added a comment.Apr 25 2019, 6:25 PM

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

Tgr moved this task from Backlog to Next on the User-Tgr board.May 20 2019, 11:54 AM