Last modified: 2014-09-18 20:04:53 UTC
On a fresh vagrant box with the role math enabled I get the following error message while trying to run the browser tests for math unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055) (Selenium::WebDriver::Error::WebDriverError) /srv/vagrant/mediawiki/extensions/Math/tests/browser/.gem/ruby/2.0.0 /gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/firefox see https://gist.github.com/physikerwelt/8a9ff6b292609449a2df I was doing nothing else beside running bundle exec cucumber features/math.feature I checked my environment variables MW_INSTALL_PATH=/vagrant/mediawiki MEDIAWIKI_API_URL=http://127.0.0.1/w/api.php MEDIAWIKI_USER=Selenium_user MEDIAWIKI_PASSWORD=vagrant INSTANCEPROJECT=math COMPOSER_CACHE_DIR=/vagrant/cache/composer MEDIAWIKI_URL=http://127.0.0.1:8080/wiki/ but could not detect any problems there
This issue was recently documented on the QA list. [1] Issue: selenium-webdriver < 2.42 doesn't work with Firefox 32. Solution: Update your gems by running `bundle update` in your tests/browser directory and verify that you're using selenium-webdriver >= 2.43 by running `bundle show selenium-webdriver`. [1] https://lists.wikimedia.org/pipermail/qa/2014-September/001890.html
Thanks for the tip. However, that did not change anything. tests/browser$ bundle show selenium-webdriver /var/lib/gems/2.0.0/gems/selenium-webdriver-2.43.0 tests/browser$ firefox --version (process:21861): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed Mozilla Firefox 32.0 Even downgrading to ff28 did not help.
Those error messages from Firefox don't necessarily indicate failure. I would kill the firefox processes and try again, running in headless mode first to rule out X-forwarding issues. HEADLESS=true bundle exec cucumber ...
Thanks. This changes the problem And I am at page that does not exist # features/step_definitions/math_steps.rb:13 And I click link Create source # features/step_definitions/math_steps.rb:17 timed out after 5 seconds, waiting for {:text=>"Create source", :tag_name=>"a"} to become present (Watir::Wait::TimeoutError) ./features/step_definitions/math_steps.rb:18:in `/^I click link Create source$/' features/math.feature:18:in `And I click link Create source' When I type <math>3 + 2</math> # features/step_definitions/math_steps.rb:25 I did not setup an x environment. Is that required? I tried to set my environment variable BROWSER=phantom but this did not help either.
X isn't required as headless mode runs Firefox through xvfb. Use of phantomjs (note the "js") as the browser is inherently headless so you don't need to specify the HEADLESS env var. You can also try using X forwarding but it's a little trickier since your labs instance may not allow it. You can inquire on #wikimedia-labs or #wikimedia-qa IRC channels about getting that setup. This bug is technically resolved if you're not seeing the firefox connection error. Your feature looks to be executing correctly, and the scenario is either failing positively or falsely. You'll have to jump into the browser session to find our more. Jump on the #wikimedia-qa channel or email the QA list for help! [1] [1] https://lists.wikimedia.org/mailman/listinfo/qa
Technically you are right. I added a section to https://www.mediawiki.org/wiki/Quality_Assurance/Browser_testing/Running_tests#Running_VisualEditor_browser_tests_via_labs-vagrant