Skip to content

Commit

Permalink
Merge branch 'bareos-17.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergkemper committed Apr 19, 2018
2 parents e9c1649 + d1115e9 commit 6b2ec5e
Show file tree
Hide file tree
Showing 2 changed files with 258 additions and 180 deletions.
17 changes: 13 additions & 4 deletions tests/selenium/README.md
Expand Up @@ -6,13 +6,14 @@ This test checks the Bareos WebUI by using seleniums webdriver.

* Python >= 2.7
* Selenium >= 3.4.0
* chromedriver or geckodriver
* chromedriver for Chrome/Chromium testing, geckodriver for Firefox testing.

## Setting up the test

To run the test you must set certain environment variables:

* `BAREOS_BROWSER`: The test takes either 'firefox' or 'chrome', default: `firefox`

* `BAREOS_BASE_URL`: The base url of the bareos-webui, default: `http://127.0.0.1/bareos-webui/`.
* `BAREOS_USERNAME`: Login user name, default: `admin`
* `BAREOS_PASSWORD`: Login password, default: `secret`
Expand All @@ -21,9 +22,13 @@ To run the test you must set certain environment variables:
* `BAREOS_LOG_PATH`: Directory to create selenium log files. The default path is the current directory.
* `BAREOS_DELAY`: Delay between action is seconds. Useful for debugging. Default is `0.0`

### Optional:

* `BAREOS_CHROMEDRIVER_PATH`: Set the path to your chromedriver here.

## Running the test

`
```
BAREOS_BASE_URL=http://127.0.0.1/bareos-webui/
BAREOS_USERNAME=admin
BAREOS_PASSWORD=linuxlinux
Expand All @@ -32,6 +37,10 @@ BAREOS_RESTOREFILE=/etc/passwd
BAREOS_LOG_PATH=/tmp/selenium-logs/
BAREOS_DELAY=1
python webui-selenium-test.py -v
`
```

After setting the environment variables you can run the test. Use `-v`option of our test to show the progress and results of each test.

## Debugging

If you meet all the requirements and set the environment variables you can run the test with `python webui-selenium-test.py`.
After the test fails you will see an exception that was thrown. If this does not help you, take a look inside the generated log file, located in the same path as your `webui-selenium-test.py` file.

0 comments on commit 6b2ec5e

Please sign in to comment.