SlideShare a Scribd company logo
Containerized End-2-End Testing
+
,Tobias Schneck ConSol Software GmbH
Characteristics of End-2-End Testing
Different types of testing:
Regression tests
Functional approval tests
Parallel tests with GUIs are complex
Stateful tests: user logins, sessions, history
Setup and cleanup of test data
Manual effort > effort for test automation
Advantages of Container Technology
Isolation of environments
Repository for versioning and distribution
Reproducible application environment
Dockerfile, docker-compose.yml
Optimized for parallel execution and cloud systems
Less memory and CPU overhead (shared Linux kernel)
Starting containers on-the-fly
Unique command line interface (orchestration tools)
Containerized GUIs
### start the docker container via x-forwarding
docker run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:rw rasch/inkscape
### start the docker container with VNC interface
# connect via URL: http://localhost:6911/vnc_auto.html?password=vncpassword
docker run -it -p 5911:5901 -p 6911:6901 consol/ubuntu-xfce-vnc
docker run -it -p 5912:5901 -p 6912:6901 consol/centos-xfce-vnc
docker run -it -p 5913:5901 -p 6913:6901 consol/ubuntu-icewm-vnc:dev
docker run -it -p 5913:5901 -p 6914:6901 consol/centos-icewm-vnc:dev
What's provided by ?
Category
Web tests through HTML selectors
Restricted to browser content
Open Source & Java API
Headless execution
Test writing assistance
(recorder, tag finder)
Automatable / Test result reporting
(CI, DB, monitoring environment)
Monitoring Integration
Nagios OMD Incinga Check_MK
Test Definition (Java Script)
Test Case Structure
// testcase.js
/*************************************
* Initialization
*************************************/
_dynamicInclude($includeFolder);
var testCase = new TestCase( 60, 70);
var env = new Environment();
var appNotepad = new Application( "gedit");
var region = new Region();
/******************************
* Description of the test case
******************************/
try {
//...
/************************************************
* Exception handling and shutdown of test case
**********************************************/
} catch (e) {
testCase.handleException(e);
} finally {
testCase.saveResult();
}
Call all Sahi Functions for Web Testing
// testacase.js
/************************
* Call Sahi Functions
***********************/
_navigateTo( "http://sahi.example.com/_s_/dyn/Driver_initialized" );
_highlight(_link( "SSL Manager" ));
_isVisible(_link( "SSL Manager" ));
_highlight(_link( "Logs"))
_click(_link( "Logs"))
testCase.endOfStep( "Test Sahi landing page" , 5);
Fluent API for UI Testing
// testacase.js
/*** open calculator app ***/
var calculatorApp = new Application( "galculator" ).open();
testCase.endOfStep( "Open Calculator" , 3);
/*** calculate 525 + 100 ***/
var calculatorRegion = calculatorApp.getRegion();
calculatorRegion.type( "525")
.find( "plus.png" )
.click()
.type( "100");
calcRegion.find( "result.png" ).click();
calcRegion.waitForImage( "625", 5);
testCase.endOfStep( "calculate 525 +100" , 20);
Custom Functions
// e.g. excluded into a separate common.js
/**********
* Combine click and highlight
*********/
function clickHighlight ($selector) {
_highlight($selector);
_click($selector);
}
/***************
* Open PDF in native viewer
**************/
var PDF_EDITOR_NAME = "masterpdfeditor3" ;
function openPdfFile (pdfFileLocation ) {
return new Application(PDF_EDITOR_NAME + ' "' + pdfFileLocation + '"').open();
}
Test Definition (Java)
public class FirstExampleTest extends AbstractSakuliTest {
private static final String CITRUS_URL = "http://www.citrusframework.org/" ;
private Environment env;
private Region screen;
@BeforeClass
@Override
public void initTC() throws Exception {
super.initTC();
env = new Environment();
screen = new Region();
browser.open();
}
@Override
protected TestCaseInitParameter getTestCaseInitParameter () throws Exception {
return new TestCaseInitParameter( "test_citrus" );
}
@Test
public void testMyApp() throws Exception {
// ... testcode
}
}
For the Maven dependencies, take a look at the .Java DSL Documentaion
Test Definition (Java)
public class FirstExampleTest extends AbstractSakuliTest {
// ... initializing code
@Test
public void testCitrusHtmlContent () throws Exception {
browser.navigateTo(CITRUS_URL);
ElementStub heading1 = browser.paragraph( "Citrus Integration Testing" );
heading1.highlight();
assertTrue(heading1.isVisible());
ElementStub download = browser.link( "/Download v.*/" );
download.highlight();
assertTrue(download.isVisible());
download.click();
ElementStub downloadLink = browser.cell( "2.6.1");
downloadLink.highlight();
assertTrue(downloadLink.isVisible());
}
@Test
public void testCitrusPictures () throws Exception {
browser.navigateTo(CITRUS_URL);
env.setSimilarity( 0.8);
screen.find( "citrus_logo.png" ).highlight();
env.type(Key.END);
screen.find( "consol_logo.png" ).highlight();
}
}
Sakuli End-2-End Testing Container
Demo - Sakuli Container
# start the docker container
docker run -it -p 5911:5901 -p 6911:6901 consol/sakuli-ubuntu-xfce
docker run -it -p 5912:5901 -p 6912:6901 consol/sakuli-centos-xfce
docker run -it -p 5913:5901 -p 6913:6901 consol/sakuli-ubuntu-xfce-java
docker run -it -p 5914:5901 -p 6914:6901 consol/sakuli-centos-xfce-java
# start in parallel via docker-compose
# use docker-compos.yml from https://github.com/ConSol/sakuli/tree/master/docker
docker-compose up
Bakery Demo Setup
Bakery Demo Setup
Bakery Demo
git clone https://github.com/toschneck/sakuli-example-bakery-testing.git
# start jenkins
jenkins/deploy_jenkins.sh
# start OMD montioring
omd-nagios/deploy_omd.sh
# start the build of the application images
bakery-app/app-deployment-docker-compose/deploy_app.sh
#start tests
sakuli-tests/execute_all.sh
#start tests for monitoring
sakuli-tests/execute_all_4_monitoring.sh
What's next?
Headless execution - Linux: VNC & Docker Windows: ?
Cloud-ready container forOpenShift (security, source-2-image)
Video recording of the test execution (error documentation)
Web UI to handle Sakuli test suites
Connect 3rd-party test management tools(HP QC, TestRail, ...)
Improve test result presentation in CI tools
Selenium as an alternative to Sahi
Implement Junit 5 test runner
Links
ConSol/sakuli
ConSol/sakuli-examples
toschneck/sakuli-example-bakery-testing
sakuli@consol.de @sakuli_e2e
Thank you!
Tobias Schneck
ConSol Software GmbH
Franziskanerstraße 38
D-81669 München
Tel: +49-89-45841-100
Fax: +49-89-45841-111
tobias.schneck@consol.
toschneck
info@consol.de
www.consol.de
ConSol

More Related Content

PDF
A Hitchhiker's Guide to Cloud Native Java EE
PPTX
Docker on openstack by OpenSource Consulting
PPTX
KVM and docker LXC Benchmarking with OpenStack
PDF
Trust, but verify | Testing with Docker Containers
PDF
Docker 활용법: dumpdocker
PDF
9.1 Grand Tour
PPTX
Container & kubernetes
PDF
Linux con europe_2014_f
A Hitchhiker's Guide to Cloud Native Java EE
Docker on openstack by OpenSource Consulting
KVM and docker LXC Benchmarking with OpenStack
Trust, but verify | Testing with Docker Containers
Docker 활용법: dumpdocker
9.1 Grand Tour
Container & kubernetes
Linux con europe_2014_f

What's hot (20)

PDF
Docker as an every day work tool
PDF
CoreOS : 설치부터 컨테이너 배포까지
PDF
Containers with systemd-nspawn
ODP
Docker meetup
PDF
GoDocker presentation
PPT
Learn basic ansible using docker
PPTX
PDF
Tokyo OpenStack Summit 2015: Unraveling Docker Security
PDF
App container rkt
PPTX
Docker Warsaw Meetup 12/2017 - DockerCon 2017 Recap
PDF
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
PDF
Cloning Running Servers with Docker and CRIU by Ross Boucher
PDF
Android Storage - StorageManager & OBB
PPTX
One click deployment
PDF
Developing with-devstack
PPTX
Linux Container Brief for IEEE WG P2302
PDF
Launching containers with fleet
PPTX
How to _docker
PPTX
Kubernetes
PDF
Podman rootless containers
Docker as an every day work tool
CoreOS : 설치부터 컨테이너 배포까지
Containers with systemd-nspawn
Docker meetup
GoDocker presentation
Learn basic ansible using docker
Tokyo OpenStack Summit 2015: Unraveling Docker Security
App container rkt
Docker Warsaw Meetup 12/2017 - DockerCon 2017 Recap
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
Cloning Running Servers with Docker and CRIU by Ross Boucher
Android Storage - StorageManager & OBB
One click deployment
Developing with-devstack
Linux Container Brief for IEEE WG P2302
Launching containers with fleet
How to _docker
Kubernetes
Podman rootless containers
Ad

Similar to Containerized End-2-End Testing - Agile Testing Meetup at Süddeutsche Zeitung Munich 19.01.2017 (20)

PDF
OOP2017: Containerized End-2-End Testing – automate it!
PDF
Integration tests: use the containers, Luke!
PPTX
Spring Boot
PDF
Workshop 23: ReactJS, React & Redux testing
PDF
PDF
Release with confidence
PPT
Beyond Unit Testing
DOCX
Custom faultpolicies
DOCX
Custom faultpolicies
DOCX
Custom faultpolicies
PPTX
Capistrano与jenkins(hudson)在java web项目中的实践
PDF
Spring Performance Gains
PDF
UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)
PPTX
Building frameworks over Selenium
PPTX
Testing frontends with nightwatch & saucelabs
PDF
Web Applications with Eclipse RT and Docker in the Cloud
PDF
UI-Testing - Selenium? Rich-Clients? Containers? @APEX connect 2018
PPTX
Moving from Jenkins 1 to 2 declarative pipeline adventures
PPTX
Android Unit Test
PDF
Improving the Accumulo User Experience
OOP2017: Containerized End-2-End Testing – automate it!
Integration tests: use the containers, Luke!
Spring Boot
Workshop 23: ReactJS, React & Redux testing
Release with confidence
Beyond Unit Testing
Custom faultpolicies
Custom faultpolicies
Custom faultpolicies
Capistrano与jenkins(hudson)在java web项目中的实践
Spring Performance Gains
UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)
Building frameworks over Selenium
Testing frontends with nightwatch & saucelabs
Web Applications with Eclipse RT and Docker in the Cloud
UI-Testing - Selenium? Rich-Clients? Containers? @APEX connect 2018
Moving from Jenkins 1 to 2 declarative pipeline adventures
Android Unit Test
Improving the Accumulo User Experience
Ad

More from Tobias Schneck (20)

PDF
Evaluating Global Load Balancing Options for Kubernetes in Practice (Kubermat...
PDF
Kubernetes and AI - Beauty and the Beast - Tobias Schneck - DOAG 24 NUE - 20....
PDF
Containers & AI - Beauty and the Beast !?! @MLCon - 27.6.2024
PDF
Containers & AI - Beauty and the Beast!?!
PDF
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
PDF
Kubernetes in the Manufacturing Line @KubeCon EU Valencia 2022
PDF
$ kubectl hacking @DevOpsCon Berlin 2019
PDF
Will ARM be the new Mainstream in our Data Centers? @Rejekts Paris 2024
PDF
Kubermatic How to Migrate 100 Clusters from On-Prem to Google Cloud Without D...
PDF
ClusterAPI Overview - Managing multi-cloud Kubernetes Clusters - k8s Meetup@v...
PDF
Creating Kubernetes multi clusters with ClusterAPI @ Stuttgart Kubernetes Meetup
PDF
KubeCI - Cloud Native Continuous Delivery for Kubernetes
PDF
Kubernetes Cluster API - managing the infrastructure of multi clusters (k8s ...
PDF
Creating Kubernetes multi clusters with ClusterAPI in the Hetzner Cloud
PDF
OpenShift Build Pipelines @ Lightweight Java User Group Meetup
PDF
OpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgart
PDF
OpenShift-Build-Pipelines: Build ► Test ► Run!
PDF
Kotlin for backend development (Hackaburg 2018 Regensburg)
PDF
Continuous Testing: Integration- und UI-Testing mit OpenShift-Build-Pipelines
PDF
Testing - Selenium? Rich-Clients? Containers?
Evaluating Global Load Balancing Options for Kubernetes in Practice (Kubermat...
Kubernetes and AI - Beauty and the Beast - Tobias Schneck - DOAG 24 NUE - 20....
Containers & AI - Beauty and the Beast !?! @MLCon - 27.6.2024
Containers & AI - Beauty and the Beast!?!
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes in the Manufacturing Line @KubeCon EU Valencia 2022
$ kubectl hacking @DevOpsCon Berlin 2019
Will ARM be the new Mainstream in our Data Centers? @Rejekts Paris 2024
Kubermatic How to Migrate 100 Clusters from On-Prem to Google Cloud Without D...
ClusterAPI Overview - Managing multi-cloud Kubernetes Clusters - k8s Meetup@v...
Creating Kubernetes multi clusters with ClusterAPI @ Stuttgart Kubernetes Meetup
KubeCI - Cloud Native Continuous Delivery for Kubernetes
Kubernetes Cluster API - managing the infrastructure of multi clusters (k8s ...
Creating Kubernetes multi clusters with ClusterAPI in the Hetzner Cloud
OpenShift Build Pipelines @ Lightweight Java User Group Meetup
OpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgart
OpenShift-Build-Pipelines: Build ► Test ► Run!
Kotlin for backend development (Hackaburg 2018 Regensburg)
Continuous Testing: Integration- und UI-Testing mit OpenShift-Build-Pipelines
Testing - Selenium? Rich-Clients? Containers?

Recently uploaded (20)

PPTX
Introduction to Windows Operating System
PPTX
Patient Appointment Booking in Odoo with online payment
PDF
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
PPTX
chapter 5 systemdesign2008.pptx for cimputer science students
PDF
DNT Brochure 2025 – ISV Solutions @ D365
PDF
Salesforce Agentforce AI Implementation.pdf
PPTX
Cybersecurity: Protecting the Digital World
PPTX
assetexplorer- product-overview - presentation
PDF
Website Design Services for Small Businesses.pdf
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
Tech Workshop Escape Room Tech Workshop
PPTX
Weekly report ppt - harsh dattuprasad patel.pptx
DOCX
How to Use SharePoint as an ISO-Compliant Document Management System
PDF
Wondershare Recoverit Full Crack New Version (Latest 2025)
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
Time Tracking Features That Teams and Organizations Actually Need
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
iTop VPN Crack Latest Version Full Key 2025
PDF
STL Containers in C++ : Sequence Container : Vector
Introduction to Windows Operating System
Patient Appointment Booking in Odoo with online payment
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
chapter 5 systemdesign2008.pptx for cimputer science students
DNT Brochure 2025 – ISV Solutions @ D365
Salesforce Agentforce AI Implementation.pdf
Cybersecurity: Protecting the Digital World
assetexplorer- product-overview - presentation
Website Design Services for Small Businesses.pdf
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Tech Workshop Escape Room Tech Workshop
Weekly report ppt - harsh dattuprasad patel.pptx
How to Use SharePoint as an ISO-Compliant Document Management System
Wondershare Recoverit Full Crack New Version (Latest 2025)
Why Generative AI is the Future of Content, Code & Creativity?
Time Tracking Features That Teams and Organizations Actually Need
Oracle Fusion HCM Cloud Demo for Beginners
Designing Intelligence for the Shop Floor.pdf
iTop VPN Crack Latest Version Full Key 2025
STL Containers in C++ : Sequence Container : Vector

Containerized End-2-End Testing - Agile Testing Meetup at Süddeutsche Zeitung Munich 19.01.2017

  • 1. Containerized End-2-End Testing + ,Tobias Schneck ConSol Software GmbH
  • 2. Characteristics of End-2-End Testing Different types of testing: Regression tests Functional approval tests Parallel tests with GUIs are complex Stateful tests: user logins, sessions, history Setup and cleanup of test data Manual effort > effort for test automation
  • 3. Advantages of Container Technology Isolation of environments Repository for versioning and distribution Reproducible application environment Dockerfile, docker-compose.yml Optimized for parallel execution and cloud systems Less memory and CPU overhead (shared Linux kernel) Starting containers on-the-fly Unique command line interface (orchestration tools)
  • 4. Containerized GUIs ### start the docker container via x-forwarding docker run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:rw rasch/inkscape ### start the docker container with VNC interface # connect via URL: http://localhost:6911/vnc_auto.html?password=vncpassword docker run -it -p 5911:5901 -p 6911:6901 consol/ubuntu-xfce-vnc docker run -it -p 5912:5901 -p 6912:6901 consol/centos-xfce-vnc docker run -it -p 5913:5901 -p 6913:6901 consol/ubuntu-icewm-vnc:dev docker run -it -p 5913:5901 -p 6914:6901 consol/centos-icewm-vnc:dev
  • 5. What's provided by ? Category Web tests through HTML selectors Restricted to browser content Open Source & Java API Headless execution Test writing assistance (recorder, tag finder) Automatable / Test result reporting (CI, DB, monitoring environment)
  • 8. Test Case Structure // testcase.js /************************************* * Initialization *************************************/ _dynamicInclude($includeFolder); var testCase = new TestCase( 60, 70); var env = new Environment(); var appNotepad = new Application( "gedit"); var region = new Region(); /****************************** * Description of the test case ******************************/ try { //... /************************************************ * Exception handling and shutdown of test case **********************************************/ } catch (e) { testCase.handleException(e); } finally { testCase.saveResult(); }
  • 9. Call all Sahi Functions for Web Testing // testacase.js /************************ * Call Sahi Functions ***********************/ _navigateTo( "http://sahi.example.com/_s_/dyn/Driver_initialized" ); _highlight(_link( "SSL Manager" )); _isVisible(_link( "SSL Manager" )); _highlight(_link( "Logs")) _click(_link( "Logs")) testCase.endOfStep( "Test Sahi landing page" , 5);
  • 10. Fluent API for UI Testing // testacase.js /*** open calculator app ***/ var calculatorApp = new Application( "galculator" ).open(); testCase.endOfStep( "Open Calculator" , 3); /*** calculate 525 + 100 ***/ var calculatorRegion = calculatorApp.getRegion(); calculatorRegion.type( "525") .find( "plus.png" ) .click() .type( "100"); calcRegion.find( "result.png" ).click(); calcRegion.waitForImage( "625", 5); testCase.endOfStep( "calculate 525 +100" , 20);
  • 11. Custom Functions // e.g. excluded into a separate common.js /********** * Combine click and highlight *********/ function clickHighlight ($selector) { _highlight($selector); _click($selector); } /*************** * Open PDF in native viewer **************/ var PDF_EDITOR_NAME = "masterpdfeditor3" ; function openPdfFile (pdfFileLocation ) { return new Application(PDF_EDITOR_NAME + ' "' + pdfFileLocation + '"').open(); }
  • 12. Test Definition (Java) public class FirstExampleTest extends AbstractSakuliTest { private static final String CITRUS_URL = "http://www.citrusframework.org/" ; private Environment env; private Region screen; @BeforeClass @Override public void initTC() throws Exception { super.initTC(); env = new Environment(); screen = new Region(); browser.open(); } @Override protected TestCaseInitParameter getTestCaseInitParameter () throws Exception { return new TestCaseInitParameter( "test_citrus" ); } @Test public void testMyApp() throws Exception { // ... testcode } } For the Maven dependencies, take a look at the .Java DSL Documentaion
  • 13. Test Definition (Java) public class FirstExampleTest extends AbstractSakuliTest { // ... initializing code @Test public void testCitrusHtmlContent () throws Exception { browser.navigateTo(CITRUS_URL); ElementStub heading1 = browser.paragraph( "Citrus Integration Testing" ); heading1.highlight(); assertTrue(heading1.isVisible()); ElementStub download = browser.link( "/Download v.*/" ); download.highlight(); assertTrue(download.isVisible()); download.click(); ElementStub downloadLink = browser.cell( "2.6.1"); downloadLink.highlight(); assertTrue(downloadLink.isVisible()); } @Test public void testCitrusPictures () throws Exception { browser.navigateTo(CITRUS_URL); env.setSimilarity( 0.8); screen.find( "citrus_logo.png" ).highlight(); env.type(Key.END); screen.find( "consol_logo.png" ).highlight(); } }
  • 15. Demo - Sakuli Container # start the docker container docker run -it -p 5911:5901 -p 6911:6901 consol/sakuli-ubuntu-xfce docker run -it -p 5912:5901 -p 6912:6901 consol/sakuli-centos-xfce docker run -it -p 5913:5901 -p 6913:6901 consol/sakuli-ubuntu-xfce-java docker run -it -p 5914:5901 -p 6914:6901 consol/sakuli-centos-xfce-java # start in parallel via docker-compose # use docker-compos.yml from https://github.com/ConSol/sakuli/tree/master/docker docker-compose up
  • 18. Bakery Demo git clone https://github.com/toschneck/sakuli-example-bakery-testing.git # start jenkins jenkins/deploy_jenkins.sh # start OMD montioring omd-nagios/deploy_omd.sh # start the build of the application images bakery-app/app-deployment-docker-compose/deploy_app.sh #start tests sakuli-tests/execute_all.sh #start tests for monitoring sakuli-tests/execute_all_4_monitoring.sh
  • 19. What's next? Headless execution - Linux: VNC & Docker Windows: ? Cloud-ready container forOpenShift (security, source-2-image) Video recording of the test execution (error documentation) Web UI to handle Sakuli test suites Connect 3rd-party test management tools(HP QC, TestRail, ...) Improve test result presentation in CI tools Selenium as an alternative to Sahi Implement Junit 5 test runner
  • 21. Thank you! Tobias Schneck ConSol Software GmbH Franziskanerstraße 38 D-81669 München Tel: +49-89-45841-100 Fax: +49-89-45841-111 tobias.schneck@consol. toschneck info@consol.de www.consol.de ConSol