Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Latest commit

 

History

History
61 lines (34 loc) · 2.83 KB

File metadata and controls

61 lines (34 loc) · 2.83 KB

sakuli-logo

Sakuli Selenium Integration Example

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).

Use Case

Extend your current Selenium test with native screenbased testing like Sakuli.

Native OS specific Test: OsNativeTest.java

selenium test native app

Web + Native PDF specific Test: CitrusHtmlPdfTest.java

selenium test citrus HTML and PDF

With Sakuli Se extension you can also forwad your results to monitoring system like OMD (nagios), Icinga2, check_mk.

Build & Run & debug tests in Docker container

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*

Docker Compose Setup

To use a more comfortable setup user Docker Compose:

docker-compose up --build --force-recreate

Run with skaffold

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