Skip to content
Snippets Groups Projects
Verified Commit 8eeb1e48 authored by Varac's avatar Varac
Browse files

Add behave test details

parent 791b3d56
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,22 @@ Run all tests:
Behave tests run in a browser and test if all the interfaces are up
and running and correctly connected to each other. They are integrated in the
`openappstack` CLI command suite.
#### Prerequisites
By default the behave tests use the Chrome/Chromium webdriver. If you want/need
to use the Firefox webdriver please refer to the manual behave test instructions
below.
Install [Chromedriver](https://sites.google.com/a/chromium.org/chromedriver/),
i.e. for Debian/Ubuntu use:
apt install chromium-chromedriver
#### Usage
To run all behave tests, run the following command in this repository:
python -m openappstack CLUSTERNAME test
......@@ -53,6 +69,39 @@ You can also only run a behave test for a specific application, i.e.:
python -m openappstack CLUSTERNAME test --behave-tags nextcloud
#### Run behave test manually
Change to the `test/behave` directory and run:
For nextcloud test:
behave -D nextcloud.url=https://files.example.openappstack.net \
-D nextcloud.password="$(cat ../../clusters/YOUR_CLUSTERNAME/secrets/nextcloud_admin_password)" \
-t nextcloud
For grafana test:
behave -D grafana.url=https://grafana.example.openappstack.net \
-D grafana.password="$(cat ../../clusters/YOUR_CLUSTERNAME/secrets/grafana_admin_password)" \
-t grafana
Use Firefox instead of Chromium:
apt install firefox-geckodriver
Now you only need to add `-D browser=firefox` to the behave command line options.
#### Run behave tests in openappstack-ci docker image
docker run --rm -it open.greenhost.net:4567/openappstack/openappstack/openappstack-ci sh
apk --no-cache add git
git clone https://open.greenhost.net/openappstack/openappstack.git
cd openappstack/test/behave
behave -D nextcloud.url=https://files.ci-20410.ci.openappstack.net \
-D nextcloud.admin.password=…
### Advanced usage
Specify host manually:
......
# Run behave test manually
## Prerequisites
By default the behave tests use the Chrome/Chromium webdriver. You can use the
Firefox webdriver by adding `-D browser=firefox` to the behave command line
options.
Depending on your choice you need to have the matching webdriver binary installed.
I.e for Debian/Ubuntu use:
apt install chromium-chromedriver
or to use Firefox:
apt install firefox-geckodriver
## Usage
Change to the `test/behave` directory and run:
For nextcloud test:
behave -D nextcloud.url=https://files.example.openappstack.net \
-D nextcloud.password="$(cat ../../ansible/cluster_data/secrets/nextcloud_admin_password)" \
-t nextcloud
For grafana test:
behave -D grafana.url=https://grafana.example.openappstack.net \
-D grafana.password="$(cat ../../ansible/cluster_data/secrets/grafana_admin_password)" \
-t grafana
# Run behave tests in openappstack-ci docker image
docker run --rm -it open.greenhost.net:4567/openappstack/openappstack/openappstack-ci sh
apk --no-cache add git
git clone https://open.greenhost.net/openappstack/openappstack.git
cd openappstack/test/behave
behave -D nextcloud.url=https://files.ci-20410.ci.openappstack.net \
-D nextcloud.admin.password=…
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment