[QA] Coverage tracking
Antoine Musso
hashar+wmf at free.fr
Thu Feb 27 20:28:15 UTC 2014
Le 26/02/2014 23:04, addshorewiki a écrit :
> Hi all!
>
> I was just wondering if there are any plans in the near future to add
> some sort of automated tracking / graphing to the coverage data we get
> from core phpunit tests?[1]
> Currently I am half maintaining my own hilariously formatted table and
> graph [2] so it would be great to see something more automated and cleaner!
>
> [1]
> https://integration.wikimedia.org/cover/mediawiki-core/master/php/index.html
> [2] https://docs.google.com/spreadsheet/pub?key=0ArUN7tgsOZ8qdDNUWUJvN3dwVHdjWS10UXppWXpSSmc&output=html
A nice coverage report would indeed be most welcome. That might help
getting folks involved in creating unit tests and or refactoring some of
our existing code.
As for our current coverage, let me copy paste an internal email:
The code coverage job invoke phpunit with a coverage report using the
clover format.
I have added the Clover PHP Plugin to the job. It does support trends
as shown on the wiki page:
https://wiki.jenkins-ci.org/display/JENKINS/Clover+PHP+Plugin
The trends are not generated because:
- PHP segfault at the very end of the execution which cause the build to
fail https://bugzilla.wikimedia.org/43972
- Clover PHP Plugin does not execute on failing build. That is probably
easy to fix but I have zero java knowledge, so I filled a feature
request upstream:
https://issues.jenkins-ci.org/browse/JENKINS-21046
I made the coverage job to gzip the clover XML output file and
archive it on each build as a bz2.
Jenkins change: https://gerrit.wikimedia.org/r/#/c/115883/
Example run:
https://integration.wikimedia.org/ci/job/mediawiki-core-code-coverage/381/
--
Antoine "hashar" Musso
More information about the QA
mailing list