Page MenuHomePhabricator

Add role to run Virtualbox with vb.gui = true for testing without a X client on the host
Closed, ResolvedPublic

Description

Author: rachelqa99

Description:
Mediawiki Vagrant installed fine and browsertests role also. I installed the NoWindows sw according to Gui customize page, http://www.mediawiki.org/wiki/MediaWiki-Vagrant/Customizing#Adding_a_gui.

Looks like I can't use mediawiki vagrant from regular command prompt due to ssh problems:

C:\Mediawiki_vagrant>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] VirtualBox VM is already running.

C:\Mediawiki_vagrant>vagrant ssh -- -X
ssh executable not found in any directories in the %PATH% variable. Is an
SSH client installed? Try installing Cygwin, MinGW or Git, all of which
contain an SSH client. Or use the PuTTY SSH client with the following
authentication information shown below:

Host: 127.0.0.1
Port: 2222
Username: vagrant
Private key: C:/VirtualBox/insecure_private_key

I tried it in Git shell (MingW32) and this is what I got. Note that NoWindows has been installed.

$ vagrant ssh -- -X
Welcome to Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-49-generic x86_64)

mmm mmm mm mm mm mm

    1. # "" "" ## ""
      1. m##m m#m m#m "#m m#" ## m" ##
  1. mmmm " " " mmm m ##
  2. "" """""" m""" #""# "m ##
  3. "mmmm# "mm# mmmmmm mmm# # # mmmmmm "#m mmmmmm "" "" """"" """ "" """""""" """" "" """ """ """""""" "" """ """"""""
  • MediaWiki is located at /vagrant/mediawiki.
  • To interactively evaluate PHP and MediaWiki code, run 'phpsh'.
  • For a database shell, run 'mysql'.
  • For help, visit https://www.mediawiki.org or MediaWiki-General on chat.freenode.net.
System load:  0.01              Processes:           90
Usage of /:   4.6% of 39.36GB   Users logged in:     0
Memory usage: 25%               IP address for eth0: 10.0.2.15
Swap usage:   0%                IP address for eth1: 10.11.12.13

Last login: Tue Jul 23 14:04:04 2013 from 10.0.2.2
-bash: /etc/virtualbox-version: No such file or directory
tput: unknown terminal "msys"
tput: unknown terminal "msys"
tput: unknown terminal "msys"
Your VirtualBox guest additions are out-of-date. Please run 'update-guest-additi
ons'.
vagrant@mediawiki-vagrant:~$ cd /srv/browsertests/
<ts$ bundle exec cucumber features/wikilove.feature
Using the default profile...
FF--F-------------------

(::) failed steps (::)

Unable to pick a platform for the provided browser (RuntimeError)
./features/step_definitions/upload_wizard_steps.rb:2:in `/^I am logged in$/'
features/wikilove.feature:5:in `Given I am logged in'

Failing Scenarios:
cucumber features/wikilove.feature:9 # Scenario: Wikilove barnstar options

3 scenarios (1 failed, 2 skipped)
20 steps (1 failed, 19 skipped)
1m4.595s

What to do next to get my browsertests running?


Version: unspecified
Severity: enhancement

Details

Reference
bz51882

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:03 AM
bzimport set Reference to bz51882.

[mass-moving from Tools>MediaWiki-Vagrant to separate product. See bug 54041. Filter bugmail on this comment.]

Is this worth retesting at this point?

I have added Dan to cc, he is working on mediawiki-vagrant these days, as far as I know.

Dan, I have mentioned this problem on Tuesday. Let me know if you do not remember.

I don't think this particular case is worth reproducing, given that the use of NoWindows is no longer mentioned on the wiki as a via option for Windows users (the link provided is dead). However, it would definitely be worth while to add a wiki section to give future browser-test/Windows users some direction.[1]

The absolute easier setup I can think of would be to install xvfb and run the tests in headless mode. Of course you'd lose the ability to interactively debug, but some visual debugging is still available using the new screenshots feature. The next best setup I can think of would be to just use a headed VirtualBox configuration (vb.gui = true),[2] and install X on the VM.

1: https://www.mediawiki.org/wiki/Quality_Assurance/Browser_testing/Running_tests
2: https://www.mediawiki.org/wiki/MediaWiki-Vagrant#How_do_I....3F

(In reply to Dan Duvall from comment #4)

The absolute easier setup I can think of would be to install xvfb and run
the tests in headless mode.

Adding a properly setup xvfb to the basic Vagrant image seems like a good thing to do. +1

The next best setup I can think of would be to just use a headed VirtualBox
configuration (vb.gui = true),[2] and install X on the VM.

This sounds like a nice role to create. The vagrant::settings class (and associated machinery in the wm-v plugin) could be trivially extended to allow the role to toggle the vb.gui flag and automate the vagrant reload step that would be needed after.

xvfb is now installed by default when a browser testing is provisioned.

Changing bug title, priority and assignment for the possible add-on role to configure the VM with X and a gui.

zeljkofilipin claimed this task.
zeljkofilipin subscribed.

Selenium tests can be executed from inside mediawiki-vagrant virtual machine: https://www.mediawiki.org/wiki/Selenium/Ruby/Inside_MediaWiki-Vagrant_virtual_machine