Selenium/How-to/Set environment variables

The test suite needs to know the address of the MediaWiki server you want to test against, and what user it should log in as.

Depending on how you installed MediaWiki, this might be automatically handled for you already. If you encounter  then you may need to do a one-time step to set some environment variables, which allows our test suite to discover this information.

The below shows two methods: set environment variables using the  command on the terminal, or store them in a   file. Both options do the same thing. It is up to you do decide which one to use.

When using environment variables in the terminal, you can make it easier for next time, by setting them from a shell configuration file (, ...). That means the variables are always available from any terminal session.

Target MediaWiki-Docker
Environment variables in terminal:

Or create a  file at the root of the MediaWiki repository:

Target Cli/docker
Environment variables in terminal:

Target MediaWiki-Docker-Dev
Environment variables in terminal:

Target MediaWiki-Vagrant
Environment variables in terminal:

Target Beta cluster
You can also run the test suite of your local MediaWiki copy against against a different MediaWiki site. To do this, override the environment variables in terminal. (Don't worry, this is temporary! When you close the terminal, this override will not be saved.)

Replace  and   with your username and password.