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

What's hot

One click deployment
One click deploymentOne click deployment
One click deployment
Alex Su
 

What's hot (20)

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

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

OOP2017: Containerized End-2-End Testing – automate it!
OOP2017: Containerized End-2-End Testing – automate it!OOP2017: Containerized End-2-End Testing – automate it!
OOP2017: Containerized End-2-End Testing – automate it!
Tobias Schneck
 
UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)
UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)
UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)
Tobias Schneck
 
UI-Testing - Selenium? Rich-Clients? Containers? @APEX connect 2018
UI-Testing - Selenium? Rich-Clients? Containers? @APEX connect 2018UI-Testing - Selenium? Rich-Clients? Containers? @APEX connect 2018
UI-Testing - Selenium? Rich-Clients? Containers? @APEX connect 2018
Tobias Schneck
 

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

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

More from Tobias Schneck

ClusterAPI Overview - Managing multi-cloud Kubernetes Clusters - k8s Meetup@v...
ClusterAPI Overview - Managing multi-cloud Kubernetes Clusters - k8s Meetup@v...ClusterAPI Overview - Managing multi-cloud Kubernetes Clusters - k8s Meetup@v...
ClusterAPI Overview - Managing multi-cloud Kubernetes Clusters - k8s Meetup@v...
Tobias Schneck
 
Creating Kubernetes multi clusters with ClusterAPI @ Stuttgart Kubernetes Meetup
Creating Kubernetes multi clusters with ClusterAPI @ Stuttgart Kubernetes MeetupCreating Kubernetes multi clusters with ClusterAPI @ Stuttgart Kubernetes Meetup
Creating Kubernetes multi clusters with ClusterAPI @ Stuttgart Kubernetes Meetup
Tobias Schneck
 
Kubernetes Cluster API - managing the infrastructure of multi clusters (k8s ...
Kubernetes Cluster API - managing the infrastructure of  multi clusters (k8s ...Kubernetes Cluster API - managing the infrastructure of  multi clusters (k8s ...
Kubernetes Cluster API - managing the infrastructure of multi clusters (k8s ...
Tobias Schneck
 
OpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgart
OpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgartOpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgart
OpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgart
Tobias Schneck
 
OpenShift-Build-Pipelines: Build ► Test ► Run!
OpenShift-Build-Pipelines: Build ► Test ► Run!OpenShift-Build-Pipelines: Build ► Test ► Run!
OpenShift-Build-Pipelines: Build ► Test ► Run!
Tobias Schneck
 
Testing - Selenium? Rich-Clients? Containers?
Testing - Selenium? Rich-Clients? Containers?Testing - Selenium? Rich-Clients? Containers?
Testing - Selenium? Rich-Clients? Containers?
Tobias Schneck
 

More from Tobias Schneck (20)

Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Kubernetes in the Manufacturing Line @KubeCon EU Valencia 2022
Kubernetes in the Manufacturing Line  @KubeCon EU Valencia 2022 Kubernetes in the Manufacturing Line  @KubeCon EU Valencia 2022
Kubernetes in the Manufacturing Line @KubeCon EU Valencia 2022
 
$ kubectl hacking @DevOpsCon Berlin 2019
$ kubectl hacking @DevOpsCon Berlin 2019$ kubectl hacking @DevOpsCon Berlin 2019
$ kubectl hacking @DevOpsCon Berlin 2019
 
Will ARM be the new Mainstream in our Data Centers? @Rejekts Paris 2024
 Will ARM be the new Mainstream in our Data Centers? @Rejekts Paris 2024 Will ARM be the new Mainstream in our Data Centers? @Rejekts Paris 2024
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...
Kubermatic How to Migrate 100 Clusters from On-Prem to Google Cloud Without D...Kubermatic How to Migrate 100 Clusters from On-Prem to Google Cloud Without D...
Kubermatic How to Migrate 100 Clusters from On-Prem to Google Cloud Without D...
 
ClusterAPI Overview - Managing multi-cloud Kubernetes Clusters - k8s Meetup@v...
ClusterAPI Overview - Managing multi-cloud Kubernetes Clusters - k8s Meetup@v...ClusterAPI Overview - Managing multi-cloud Kubernetes Clusters - k8s Meetup@v...
ClusterAPI Overview - Managing multi-cloud Kubernetes Clusters - k8s Meetup@v...
 
Creating Kubernetes multi clusters with ClusterAPI @ Stuttgart Kubernetes Meetup
Creating Kubernetes multi clusters with ClusterAPI @ Stuttgart Kubernetes MeetupCreating Kubernetes multi clusters with ClusterAPI @ Stuttgart Kubernetes Meetup
Creating Kubernetes multi clusters with ClusterAPI @ Stuttgart Kubernetes Meetup
 
KubeCI - Cloud Native Continuous Delivery for Kubernetes
KubeCI - Cloud Native Continuous Delivery for KubernetesKubeCI - Cloud Native Continuous Delivery for Kubernetes
KubeCI - Cloud Native Continuous Delivery for Kubernetes
 
Kubernetes Cluster API - managing the infrastructure of multi clusters (k8s ...
Kubernetes Cluster API - managing the infrastructure of  multi clusters (k8s ...Kubernetes Cluster API - managing the infrastructure of  multi clusters (k8s ...
Kubernetes Cluster API - managing the infrastructure of multi clusters (k8s ...
 
Creating Kubernetes multi clusters with ClusterAPI in the Hetzner Cloud
Creating Kubernetes multi clusters with ClusterAPI in the Hetzner CloudCreating Kubernetes multi clusters with ClusterAPI in the Hetzner Cloud
Creating Kubernetes multi clusters with ClusterAPI in the Hetzner Cloud
 
OpenShift Build Pipelines @ Lightweight Java User Group Meetup
OpenShift Build Pipelines @ Lightweight Java User Group MeetupOpenShift Build Pipelines @ Lightweight Java User Group Meetup
OpenShift Build Pipelines @ Lightweight Java User Group Meetup
 
OpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgart
OpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgartOpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgart
OpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgart
 
OpenShift-Build-Pipelines: Build ► Test ► Run!
OpenShift-Build-Pipelines: Build ► Test ► Run!OpenShift-Build-Pipelines: Build ► Test ► Run!
OpenShift-Build-Pipelines: Build ► Test ► Run!
 
Kotlin for backend development (Hackaburg 2018 Regensburg)
Kotlin for backend development (Hackaburg 2018 Regensburg)Kotlin for backend development (Hackaburg 2018 Regensburg)
Kotlin for backend development (Hackaburg 2018 Regensburg)
 
Continuous Testing: Integration- und UI-Testing mit OpenShift-Build-Pipelines
Continuous Testing: Integration- und UI-Testing mit OpenShift-Build-PipelinesContinuous Testing: Integration- und UI-Testing mit OpenShift-Build-Pipelines
Continuous Testing: Integration- und UI-Testing mit OpenShift-Build-Pipelines
 
Testing - Selenium? Rich-Clients? Containers?
Testing - Selenium? Rich-Clients? Containers?Testing - Selenium? Rich-Clients? Containers?
Testing - Selenium? Rich-Clients? Containers?
 
Containerized End-2-End-Testing - ContainerConf Mannheim
Containerized End-2-End-Testing - ContainerConf MannheimContainerized End-2-End-Testing - ContainerConf Mannheim
Containerized End-2-End-Testing - ContainerConf Mannheim
 
Containerized End-2-End-Testing - Software-QS-Tag (deutsch)
Containerized End-2-End-Testing - Software-QS-Tag (deutsch)Containerized End-2-End-Testing - Software-QS-Tag (deutsch)
Containerized End-2-End-Testing - Software-QS-Tag (deutsch)
 
Containerized End-2-End Testing - JUG Saxony Day
Containerized End-2-End Testing - JUG Saxony DayContainerized End-2-End Testing - JUG Saxony Day
Containerized End-2-End Testing - JUG Saxony Day
 
Skale your test environment! Containerized End-2-End-Testing @Herbstcampus Nü...
Skale your test environment! Containerized End-2-End-Testing @Herbstcampus Nü...Skale your test environment! Containerized End-2-End-Testing @Herbstcampus Nü...
Skale your test environment! Containerized End-2-End-Testing @Herbstcampus Nü...
 

Recently uploaded

AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
Alluxio, Inc.
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
mbmh111980
 

Recently uploaded (20)

Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdf
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM Integration
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in Michelangelo
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting software
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
 

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