Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bareos/bareos-webui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/selenium/README.md')
-rw-r--r--tests/selenium/README.md33
1 files changed, 23 insertions, 10 deletions
diff --git a/tests/selenium/README.md b/tests/selenium/README.md
index 20c89a2..60be403 100644
--- a/tests/selenium/README.md
+++ b/tests/selenium/README.md
@@ -2,23 +2,36 @@
This test checks the Bareos WebUI by using seleniums webdriver.
+## Requirements
+
+ * Python >= 2.7
+ * Selenium >= 3.4.0
+ * chromedriver or geckodriver
## Setting up the test
To run the test you must set certain environment variables:
- * **BROWSER**: The test takes either 'firefox' or 'chrome', where 'firefox' is the default.
- * **USERNAME** and **PASSWORD**: These should contain the login information for the WebUI.
- * **VM_IP**: This should be the IP adress of the system where the Bareos WebUI runs on.
- * **RESTOREFILE**: The third test is designed to restore a certain file. The default path is '/usr/sbin/bconsole".
- * **CLIENT**: Here you need to set what Client the restore test should select.
+ * `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`
+ * `BAREOS_CLIENT_NAME`: The client to use. Default is `bareos-fd`
+ * `BAREOS_RESTOREFILE`: The third test is designed to restore a certain file. The default path is `/usr/sbin/bconsole`
+ * `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`
## Running the test
-To run all tests included you need a system that runs the WebUI, a client for restore-testing, chromedriver or geckodriver as well as any Python >= 2.7.
+`
+BAREOS_BASE_URL=http://127.0.0.1/bareos-webui/
+BAREOS_USERNAME=admin
+BAREOS_PASSWORD=linuxlinux
+BAREOS_CLIENT=bareos-fd
+BAREOS_RESTOREFILE=/etc/passwd
+BAREOS_LOG_PATH=/tmp/selenium-logs/
+BAREOS_DELAY=1
+python webui-selenium-test.py -v
+`
If you meet all the requirements and set the environment variables you can run the test with `python webui-selenium-test.py`.
-
-## Debugging
-
-If the test should fail you will find additional informations in the webui-selenium-test.log file. You might want to adjust **SLEEPTIME** environment variable to be set above 1 as it increases the time waited between commands. \ No newline at end of file