wiki.techinc.nl/tests/selenium
Željko Filipin 6e1b37c966 Page title is not used in Selenium tests
Bug: T182421
Change-Id: I0de9bf27f1227e7b29c5aaa28451823e80fa8ff1
2018-01-17 13:15:56 +01:00
..
pageobjects Page title is not used in Selenium tests 2018-01-17 13:15:56 +01:00
specs selenium, update page spec to include more chars 2018-01-15 10:36:34 +00:00
.eslintrc.json ESLint ecmaVersion setting is not needed if env is es6 2017-11-15 14:27:13 +01:00
README.md When running Selenium tests, use wd/hub 2018-01-16 18:40:33 +01:00
wdio.conf.jenkins.js Remove ESLint inline comments in WebdriverIO configuration files 2017-12-21 16:38:42 +00:00
wdio.conf.js Remove ESLint inline comments in WebdriverIO configuration files 2017-12-21 16:38:42 +00:00

Selenium tests

Prerequisites

Set up MediaWiki-Vagrant:

cd mediawiki/vagrant
vagrant up

Installation

cd mediawiki
npm install

Usage

npm run selenium

To run only one file (for example page.js), you first need to spawn the chromedriver:

chromedriver --url-base=wd/hub --port=4444

Then in another terminal:

cd tests/selenium
../../node_modules/.bin/wdio --spec specs/page.js

To run only one test (name contains string 'preferences'):

../../node_modules/.bin/wdio --spec specs/user.js --mochaOpts.grep preferences

The runner reads the config file wdio.conf.js and runs the spec listed in page.js.

The defaults in the configuration files aim are targetting a MediaWiki-Vagrant installation on installation on http://127.0.0.1:8080 with a user Admin and password 'vagrant'. Those settings can be overriden using environment variables:

MW_SERVER: to be set to the value of your $wgServer MW_SCRIPT_PATH: ditto with $wgScriptPath MEDIAWIKI_USER: username of an account that can create users on the wiki. MEDIAWIKI_PASSWORD: password for above user

Example:

MW_SERVER=http://example.org MW_SCRIPT_PATH=/dev/w npm run selenium