Page MenuHomePhabricator

Add support for running headless browser tests to mediawiki-selenium Rubygem
Closed, ResolvedPublic

Description

Author: jhall

Description:
Follow-up to a pairing session between Jeff and Željko on 1/29/2013. In order to make headless browser testing available in as many WMF repositories as possible, we should add headless support[1] to the env.rb and hooks.rb setup in the mediawiki-selenium Rubygem[2].

[1] http://watirwebdriver.com/headless/
[2] https://git.wikimedia.org/tree/mediawiki%2Fselenium/ef67a1f40db97a7e0b456fcc3fbf20c6a8ec4e81/lib%2Fmediawiki%2Fselenium


Version: wmf-deployment
Severity: enhancement

Details

Reference
bz60584

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:54 AM
bzimport set Reference to bz60584.

jhall wrote:

Should note that in order to run headless browser tests, the test environment(s) needs to have two additional components installed:

a) Headless Rubygem[1]
b) Xvfb binary for your OS[2]

[1] http://rubygems.org/gems/headless
[2] http://en.wikipedia.org/wiki/Xvfb

Change 110205 had a related patch set uploaded by Zfilipin:
WIP run browsers headlessly if HEADLESS environment variable is set to true

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

We had some browser tests running on integration-selenium-driver.pmtpa.wmflabs which is an Ubuntu Precise instance. xvfb package is 2:1.11.4-0ubuntu10.14

There is apparently no package for ruby gems headless but it is going to be a dependency of mediawiki-selenium apparently ( https://gerrit.wikimedia.org/r/#/c/110205/3/mediawiki-selenium.gemspec,unified )

Change 110335 had a related patch set uploaded by Zfilipin:
WIP run browsers headlessly if HEADLESS environment variable is set to true

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

Change 110335 abandoned by Zfilipin:
WIP run browsers headlessly if HEADLESS environment variable is set to true

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

I still have to test this with repositories that have at_exit hook. Looks like only VisualEditor has the hook, and it should probably be moved to the gem.

at one point CirrusSearch had this hook. It's in the README, but I don't see the hook itself any more.

Change 110205 merged by jenkins-bot:
Run browsers headlessly if HEADLESS environment variable is set to true

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

Change 110390 had a related patch set uploaded by Zfilipin:
Make it possible to run VisualEditor tests in headless mode

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

Change 110390 merged by jenkins-bot:
Make it possible to run VisualEditor tests in headless mode

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

hashar added a comment.Feb 3 2014, 2:46 PM

Zeljko are you sure it is fixed ? Jeff reverted https://gerrit.wikimedia.org/r/110390

But then he introduced the same thing in https://gerrit.wikimedia.org/r/#/c/110606 :)