Page MenuHomePhabricator

Run QUnit tests in CI
Closed, ResolvedPublic

Description

I tried to enable them ( - name: extension-qunit-composer) in integration/config/zuul/layout.yaml , but they fail:

https://integration.wikimedia.org/ci/job/mwext-qunit-composer-jessie/5910/console
https://integration.wikimedia.org/ci/job/mwext-qunit-composer-jessie/6336/consoleFull

I think you can also use magic comment

check experimental

to run them on a Lexeme patch

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 24 2017, 7:56 AM
Jonas raised the priority of this task from Normal to High.Apr 5 2017, 12:25 PM
hashar updated the task description. (Show Details)Apr 10 2017, 12:59 PM
hashar added a subscriber: hashar.Apr 10 2017, 1:44 PM

On both builds there is a time out being reached and the build abort after 60 seconds:

build 5910
00:06:45.981 Chrome 57.0.2987 (Linux 0.0.0): Executed 705 of 1441 (6 FAILED) (0 secs / 1 min 6.224 secs)
00:07:46.005 24 03 2017 07:17:49.848:WARN [Chrome 57.0.2987 (Linux 0.0.0)]: Disconnected (1 times), because no message in 60000 ms.

build 6336

00:03:49.340 mediawiki (mw.loader)
00:03:49.340 ✖ Basic
00:03:49.341 ✖ Object method as module name
00:03:49.342 ✖ .using( .. ) Promise
....
00:03:49.493 ✔ Broken indirect dependency
00:03:49.494 ✔ Out-of-order implementation
00:03:49.496 ✔ Missing dependency
00:04:49.506 10 04 2017 12:00:05.216:WARN [Chrome 57.0.2987 (Linux 0.0.0)]: Disconnected (1 times), because no message in 60000 ms.

The second build benefit from a change we made to Karma so it reports a human readable report.

There is some wrong in the MediaWiki core test for the mw.loader. The next test should be Dependency handling so maybe it fails/times out in that test. It is defined in tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js

The other three tests are failing though they are rather dummy one. I have no idea why they would fail though and since the build is aborted the actual errors is not emitted :(

Change 347381 had a related patch set uploaded (by Hashar):
[mediawiki/extensions/WikibaseLexeme@master] (Do not submit) unregister qunit tests

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

https://gerrit.wikimedia.org/r/#/c/347381/1 is a dummy change for WikibaseLexeme that unregister all qunit tests for that extension. The Qunit job passes.

https://gerrit.wikimedia.org/r/#/c/347381/2 I removed the scripts but kept the dependencies (who knows). And it passes.

What is puzzling is Jonas told me that they pass fine locally. Maybe that is a bad interaction with one of the other extension. I will try tomorrow by cloning all of them and see and what happens. The list being:

mediawiki/extensions/WikibaseLexeme
mediawiki/extensions/BetaFeatures
mediawiki/extensions/Capiunto
mediawiki/extensions/CirrusSearch
mediawiki/extensions/Cite
mediawiki/extensions/Echo
mediawiki/extensions/Elastica
mediawiki/extensions/GeoData
mediawiki/extensions/MwEmbedSupport
mediawiki/extensions/PdfHandler
mediawiki/extensions/Scribunto
mediawiki/extensions/SiteMatrix
mediawiki/extensions/TimedMediaHandler
mediawiki/extensions/VisualEditor
mediawiki/extensions/Wikibase
mediawiki/extensions/cldr

Jakob_WMDE moved this task from Backlog to Doing on the Wikidata-Former-Sprint-Board board.

Change 347354 had a related patch set uploaded (by Jakob):
[mediawiki/extensions/WikibaseLexeme@master] Fix broken QUnit tests.

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

Change 347596 had a related patch set uploaded (by Jakob):
[integration/config@master] Enable QUnit tests for WikibaseLexeme

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

They were failing due to some silly test overriding jQuery.ajax. Should be working now. Thanks for looking into it, @hashar!

Change 347596 merged by jenkins-bot:
[integration/config@master] Enable QUnit tests for WikibaseLexeme

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

Looks like a test did $.ajax = function () {}. I hate scoping issue, congratulations on figuring out that one! -;-)

The CI change is deployed so the QUnit job should trigger from now on.

Change 347354 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Fix broken QUnit tests.

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

Jakob_WMDE closed this task as Resolved.Apr 11 2017, 3:03 PM
Jakob_WMDE moved this task from Review to Done on the Wikidata-Former-Sprint-Board board.

Change 347381 abandoned by Hashar:
(Do not submit) unregister qunit tests

Reason:
Got fixed :-}

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