Hello,

Too long, dont want to read:
  https://integration.wikimedia.org/cover/mediawiki-core/master/php/


Jenkins is nowadays producing a nightly coverage report.  The idea is to
run our full PHPUnit tests, track which lines in MediaWiki core have
been executed and show up metrics regarding code not being executed.
That is made possible by using the XDebug php extensions and PHPUnit
code coverage feature.

In June I enforced a PHPUnit feature which force us to mention which
MediaWiki function is covered by a test method [FORCE COVER]. The option
is forceCoversAnnotation and is described in PHPUnit as:

  forceCoversAnnotation
  Code Coverage will only be recorded for tests that use the
  @covers annotation documented in the section called “@covers”.


Jenkins build the coverage report every day at 1am UTC and it takes
roughly 40 minutes to generate.  You can access the report by browsing:

 https://integration.wikimedia.org

Then on the top menu "Coverage" and pick the MediaWiki core (PHP) link:

 https://integration.wikimedia.org/cover/mediawiki-core/master/php/


A first step to enhance our coverage would be to add '@covers'
statements to our unit test methods. The tests for global functions are
good candidates: tests/phpunit/includes/GlobalFunctions


Now I am wondering where on mw.org I can document our coverage system.
Should we get a page under [[Continuous integration]] or maybe another
section in [[Manual:PHP unit testing]]  ??



[FORCE COVER] https://gerrit.wikimedia.org/r/66125
[BUG 45594] https://bugzilla.wikimedia.org/45594

-- 
Antoine "hashar" Musso


_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to