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

Create advance behave test instructions section

parent 8eeb1e48
No related branches found
No related tags found
No related merge requests found
......@@ -45,15 +45,13 @@ and running and correctly connected to each other. They are integrated in the
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.
below, under `Advanced Usage`.
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:
......@@ -69,41 +67,10 @@ 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
#### Testinfra tests
Specify host manually:
py.test -s --hosts='ssh://root@example.openappstack.net'
......@@ -125,7 +92,7 @@ or directly:
FQDN='example.openappstack.net' pytest/test_certs.py
#### Running tests with local gitlab-runner docker executor
#### Running testinfra tests with local gitlab-runner docker executor
Export the following environment variables like this:
......@@ -137,6 +104,37 @@ then:
gitlab-runner exec docker --env CI_REGISTRY_IMAGE="$CI_REGISTRY_IMAGE" --env SSH_PRIVATE_KEY="$SSH_PRIVATE_KEY" --env COSMOS_API_TOKEN="$COSMOS_API_TOKEN" bootstrap
#### Behave tests
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=…
## Upgrading
......
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