Selenium/How-to/Run tests targeting Cli

Follow instructions from Run tests targeting MediaWiki-Docker but instead of installing MediaWiki-Docker, install Cli.

Prerequisites edit

mw docker mediawiki install command will output important information. You will need User (MEDIAWIKI_USER), Pass (MEDIAWIKI_PASSWORD) and Link (MW_SERVER) in the next step.

mw docker mediawiki install --dbtype=sqlite
...
User: admin
Pass: mwddpassword
Link: http://default.mediawiki.mwdd.localhost:8080
...

Environment variables edit

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 (~/.bash_profile, ~/.zshrc...) which means the variables are always available from any terminal session:

# Target Cli
export MW_SERVER=http://default.mediawiki.mwdd.localhost:8080
export MW_SCRIPT_PATH=/w
export MEDIAWIKI_USER=admin
export MEDIAWIKI_PASSWORD=mwddpassword

If you prefer, you can create an .env file instead (in MediaWiki Core folder), with this contents.

# Target Cli
MW_SERVER=http://default.mediawiki.mwdd.localhost:8080
MW_SCRIPT_PATH=/w
MEDIAWIKI_USER=admin
MEDIAWIKI_PASSWORD=mwddpassword