Page MenuHomePhabricator

hack Jenkins to test MobileFrontend (PHPUnit + Qunit)
Closed, ResolvedPublic

Description

The mobile team is requiring some continuous integration love to avoid breaking all the various iPhone / Android whatever users. We thus want to test the MobileFrontend extensions, both PHPUnit tests and QUnit ones through TestSwarm

Jenkins needs a new job that would listen for MobileFrontend changes submitted to Gerrit. It would then:

  • fetch a copy of MediaWiki core and MobileFrontend
  • install the mw database, inject PHP configuration
  • run PHPUnit tests for MobileFrontend, phpunit --filter MobileFrontend
  • snapshot that to a public directory.
  • submit a job request to TestSwarm

Success!


Version: unspecified
Severity: normal

Details

Reference
bz37276

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:22 AM
bzimport set Reference to bz37276.

Need to poke that together with Wikidata extension: bug 37050

I did some update to the ant script to easily fetch/copy extensions from Gerrit.

PHPUnit tests are now run. See https://gerrit.wikimedia.org/r/#/c/22446/. Currently two tests fail, so no new patch sets can be merged until that's resolved.

My attempts at fixing tests:

https://gerrit.wikimedia.org/r/#/c/22455/ move around some newlines (\n).

https://gerrit.wikimedia.org/r/#/c/22457/ disable tests that parse an url containing unicode. That does not work well with PHP parse_url().

The newline issue was caused by Tidy. MaxSem fixed it properly with https://gerrit.wikimedia.org/r/#/c/22852/

So we have PHPUnit running from Jenkins now.

QUnit will be done via Testswarm which is being overhauled on labs. The project will include extensions too.