Selenium/Getting Started/Run tests using Fresh
< Selenium | Getting Started
Environments[edit]
When using Fresh, you can target several wikis.
- a local MediaWiki
- a remote wiki
Advantages[edit]
- It will be fast, if the target is local. MediaWiki core Selenium test run takes about 2 minutes on my machine. (As of October 2019.)
- Works without an internet connection, if the target is local.
- Doesn't require installing Vagrant.
- Doesn't require executing npm packages directly on your machine (which is dangerous).
Disadvantages[edit]
- You need to have Docker installed.
Prerequisites[edit]
- MediaWiki.
- Docker. See Docker CE for Linux, Docker for Mac, or Docker for Windows.
- Wikimedia Fresh CLI.
Go to MediaWiki Core folder[edit]
cd core
Environment variables[edit]
If you're targeting MediaWiki-Docker, you don't have to do anything. If you're targeting another setup, see Selenium/How-to/Set environment variables.
Start a Fresh session[edit]
you:core$ fresh-node -env -net
...
# env: MW_*, MEDIAWIKI_*
# net: expose host
🌱 Fresh!
nobody@docker-desktop:/core$
Install dependencies[edit]
nobody@docker-desktop:/core$ npm ci
Run Selenium tests[edit]
nobody@docker-desktop:/core$ npm run selenium-test