This is an example Project-Setup to integrate Selenium with your Sakuli Tests.
Chrome Driver: https://sites.google.com/a/chromium.org/chromedriver/downloads Firefox Driver (geckodriver): https://github.com/mozilla/geckodriver/releases
General note: If you get the exception java.nio.file.AccessDeniedException: /opt/test/example_xfce/_logs
please ensure that you local files have the correct file permissions. If you not sure you can run chmod a+rw -R .
or change user: 1000
to your own user id (execute id -u
).
Extend your current Selenium test with native screenbased testing like Sakuli.
Native OS specific Test: OsNativeTest.java
Web + Native PDF specific Test: CitrusHtmlPdfTest.java
With Sakuli Se extension you can also forwad your results to monitoring system like OMD (nagios), Icinga2, check_mk.
To run the example direct in a docker container you can execute the following command. Then you can control the testcases through the bash
console. To connect on the embedded UI open: http://localhost:6911/?password=sakuli
docker build -t local/sakuli-se . \
&& docker run -it \
-v $(pwd):/opt/maven -v ~/.m2:/headless/.m2 \
-p 5911:5901 -p 6911:6901 \
local/sakuli-se bash
To run the whole testsuite you simple execute:
mvn -P docker test
To run a specific test you use the maven option -Dtest=MyTest*
mvn -P docker test -Dtest=GitHub*
To use a more comfortable setup user Docker Compose:
docker-compose up --build --force-recreate
First create a new k8s cluster, e.g. under https://cloud.kubermatic.io (recommend is AWS so that an external load balancer is provided). Download and set correct kubeconfig
.
export KUBECONFIG=~/Downloads/kubeconfig-CI-cluster
Install the cleanup-operator
of lwolf/kube-cleanup-operator:
kubectl apply -f kubernetes-manifests/cleanup-operator/*.yaml
Run skaffold build & run:
skaffold run