Selenium/Getting Started/Run tests targeting MediaWiki-Docker
This page describes how to run Selenium tests locally on your development install of MediaWiki. This tutorial is based on the setup from MediaWiki-Docker.
- It will be fast, since the target machine is local. MediaWiki core Selenium test run takes about 4 minutes on my machine. (As of September 2019.)
- Works without an internet connection.
- You will have to install MediaWiki, Selenium and their dependencies on your machine.
Ensure the following environment variables are set. Either run this manually from the terminal or, to make it easier for next time, set them from shell configuration file (
~/.zshrc...) which means the variables are always available from any terminal session:
export MW_SERVER=http://localhost:8080 export MW_SCRIPT_PATH=/ export MEDIAWIKI_USER=Admin export MEDIAWIKI_PASSWORD=dockerpass
Run Selenium testsEdit
npm run selenium