mirror of
https://github.com/aelve/guide.git
synced 2024-11-25 07:52:52 +03:00
Updated Selenium tests (markdown)
parent
5a7f9ac9f9
commit
070882372a
@ -1,10 +1,58 @@
|
||||
## Running tests
|
||||
|
||||
## Setting up Selenium with the Chromium webdriver:
|
||||
|
||||
Instructions assume Ubuntu 16.04/16.10, but package managers for your distribution should have working distributions.
|
||||
|
||||
1. Java runtime (`java`).
|
||||
|
||||
The Oracle JVM can be installed with:
|
||||
|
||||
```
|
||||
apt install oracle-java8-installer
|
||||
```
|
||||
|
||||
Note: These instructions are incomplete if using OpenJDK.
|
||||
|
||||
2. Selenium stand-alone server.
|
||||
|
||||
Obtain the standalone server from the [Selenium downloads page](http://docs.seleniumhq.org/download/).
|
||||
|
||||
Using the current download link (as of Feb 2. 2017) to download it to your home directory:
|
||||
|
||||
```
|
||||
wget https://goo.gl/Lyo36k -o ~/selenium-server-standalone.jar
|
||||
```
|
||||
|
||||
3. Chromium webdriver.
|
||||
|
||||
This will install the `chromedriver` binary to `/usr/lib/chromium-browser/chromedriver` on Ubuntu. Take note of the location of the binary if your package manager uses.
|
||||
|
||||
```
|
||||
apt install chromium-chromedriver
|
||||
```
|
||||
|
||||
4. (Optional) For headless operation, xvfb.
|
||||
|
||||
The X virtual framebuffer will allow Chromium to run for tests on a server, this is not necessary if using a desktop with X or X forwarding.
|
||||
|
||||
```
|
||||
apt install xvfb
|
||||
```
|
||||
|
||||
5. Launching Selenium.
|
||||
|
||||
The path to the `chromedriver` binary needs to be given when launching the server, as follows:
|
||||
|
||||
```
|
||||
java -Dwebdriver.chrome.driver=/usr/lib/chromium-browser/chromedriver -jar ~/selenium-server-standalone.jar
|
||||
```
|
||||
|
||||
### With Stack
|
||||
|
||||
To run the full testsuite, do `stack test`. You'll need Selenium server running.
|
||||
Before running the test suite, you will need to launch Selenium and the server will run during tests.
|
||||
|
||||
[TODO: describe how to get Selenium running]
|
||||
To run the full testsuite, do `stack test`. You'll need Selenium server running.
|
||||
|
||||
### From GHCi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user