mediawiki-extensions-Relate.../tests/browser
Baha 1bc4b5c1b3 Fix browser tests
The ReadMore checkbox on the beta preferences page doesn't have an ID
anymore. It has a name though, which is used from now on.

The regression was introduced in I8636f32330e23814ba3b4c0f5e22e55aaf77883e.

Bug: T148856
Change-Id: Ieb20c8d9e97d53e6afae3a9fc99ce4dea471b0b5
2016-10-24 15:27:53 -04:00
..
features Fix browser tests 2016-10-24 15:27:53 -04:00
samples Add browser tests for ReadMore 2015-12-04 15:43:45 +05:00
ci.yml Migration of browsertests* Jenkins jobs to selenium* jobs 2016-04-25 19:35:20 +02:00
environments.yml Fix MediawikiApi::HttpError in Selenium tests 2016-09-16 17:02:14 +02:00
LocalSettings.php Allow blacklisting skins for showing ReadMore in footer 2016-09-26 15:26:03 +00:00
README.mediawiki Add browser tests for ReadMore 2015-12-04 15:43:45 +05:00

= Setup =

Please include the LocalSettings.php file in your MediaWiki instance.


== Selenium tests ==

To run the Selenium tests you will have to install Ruby (for the exact
version see Gemfile), the latest versions of RubyGems and Firefox.

The easiest way to install Ruby on *nix is RVM (https://rvm.io/) and on
Windows RubyInstaller (http://rubyinstaller.org/).

Open terminal in tests/browser. Update RubyGems and install required
gems with:

  gem update --system
  gem install bundler
  bundle install

Environment variables MEDIAWIKI_USER and MEDIAWIKI_PASSWORD are required for
tests tagged `@login`. For local testing, create a test user on your local wiki
and export the user and password as the values for those variables.
For example:

  export MEDIAWIKI_USER=<username here> # Linux/Unix/Mac
  set MEDIAWIKI_USER=<username here> # Windows

  export MEDIAWIKI_PASSWORD=<password here> # Linux/Unix/Mac
  set MEDIAWIKI_PASSWORD=<password here> # Windows

In addition to this create another user which will be reserved for new uploads
"Selenium_newuser". The password for this user should be the same as
MEDIAWIKI_PASSWORD

Tests that use the "Given I create a random page using the API" step need to set
the MEDIAWIKI_API_URL environment variable, e.g.
export MEDIAWIKI_API_URL=http://en.wikipedia.beta.wmflabs.org/w/api.php

Run the tests from the RelatedArticles directory with:

  make cucumber

If you want to run a single set of tests, go to the tests/browser directory and
call 'bundle exec cucumber' with the path to the test file. For example, to run
only the watchlist tests:

  bundle exec cucumber features/read_more_desktop.feature

XML report (for Jenkins) is created at tests/browser/reports/junit.

Jenkins is hosted at https://wmf.ci.cloudbees.com/ and it drives
browsers at http://saucelabs.com/

For more information about running Selenium tests please see
https://github.com/wikimedia/mediawiki-selenium