|Warning:||Instructions on this page are not working at the moment. See T236282.|
For this example, we will not enable any roles and we will use MediaWiki core.
Running Selenium tests from inside MediaWiki-Vagrant machine has several advantages:
- You do not have to install anything on your machine, except MediaWiki-Vagrant itself, and it's dependencies.
- It will be fast, since the target machine is local. MediaWiki core Selenium test run takes about 3 minutes on my machine. (As of September 2019.)
- After everything is set up, you do not need internet connection.
- You are probably already familiar with MediaWiki-Vagrant and have it installed.
- While the tests are running, you can continue using your machine as usual, because everything is happening inside the virtual machine.
- You might not be familiar with MediaWiki-Vagrant, so you will have to learn how to install and use yet another tool.
- You will have to install MediaWiki-Vagrant and it's dependencies on your machine.
- The machine is headless (no display) so it is harder to debug failed tests, but not impossible.
Set up MediaWiki-VagrantEdit
- Follow instructions at MediaWiki-Vagrant
Boot the machineEdit
$ vagrant up
SSH into the machineEdit
$ vagrant ssh
vagrant@vagrant:~$ cd /vagrant/mediawiki
Install dependencies in the machineEdit
vagrant@vagrant:/vagrant/mediawiki$ sudo apt-get install chromedriver
vagrant@vagrant:/vagrant/mediawiki$ npm install
Run the Selenium testsEdit
vagrant@vagrant:/vagrant/mediawiki$ npm run selenium
Exit the machineEdit
halt the machineEdit
$ vagrant suspend
$ vagrant halt