Page MenuHomePhabricator

[Task] Wikibase: have test coverage of JavaScript QUnit tests
Closed, DuplicatePublic

Description

Generate and publish code coverage reports for QUnit tests.

Details

Reference
bz40656

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:52 AM
bzimport set Reference to bz40656.
bzimport added a subscriber: Unknown Object (MLST).

*** Bug 42568 has been marked as a duplicate of this bug. ***

A possible solution could be http://blanketjs.org/. Needs investigation.

blanket.js does not easily work with ResourceLoader. CompletenessTest is quite ugly, but I guess we have to work with that.

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).

The direction for QUnit testing forward is Karma. Karma has an official coverage plugin powered by istanbul-js.

Several projects are already using this. Published at https://integration.wikimedia.org/cover/.

However for tests that are not standalone but depend on MediaWiki core, this doesn't work yet since we need to map things back to the file system from the proxied MediaWiki PHP requests. Whether that is feasible in the short term I'm not sure. I suspect bypassing it by solving T89433 is probably more feasible. And would also improve the quality of our code.

JanZerebecki renamed this task from Test coverage of JavaScript QUnit tests to [Task] Test coverage of JavaScript QUnit tests.Sep 10 2015, 12:46 PM
JanZerebecki updated the task description. (Show Details)
JanZerebecki set Security to None.
JanZerebecki renamed this task from [Task] Test coverage of JavaScript QUnit tests to [Task] Wikibase: have test coverage of JavaScript QUnit tests.Sep 10 2015, 12:47 PM