SlideShare a Scribd company logo
Getting Started with Dockerization of Selenium Tests Execution
Sargis Sargsyan, Testwarez, Poland 2019

2
Sargis Sargsyan
Director, Quality Assurance at PicsArt
#TestWarez2019
3
Introduction to Presentation
1 Why? 2 What is Selenium Grid 3
Running Selenium Suite
in Parallel
4 What is Docker Selenium 5
Configure Selenium Grid
in Docker Containers
6
Creating and maintaining  
docker-compose file
7 Zalenium  9 Q&A8 Selenoid
 Why? Don’t you have an answer yet?
#TestWarez2019Why we need to Dockerize Selenium Run
Run in different environment
Easy to setup
Secure
More Stability
No need to manage Selenium server jar
No need to download drivers, as it is done automatically
You Do Not Need to Make the Switch to Parallel Testing All at Once
Capacity to Scale (Parallel Running)
#TestWarez2019Reasons to Start Running Tests in Parallel
Test for wider Compatibility
Can radically reduce testing time
Optimizes continuous integration and delivery
Cost effective testing
Enables teams to focus on making tests repeatable, measurable and accurate
You can still perform sequential tests, when needed
You Do Not Need to Make the Switch to Parallel Testing All at Once
 Getting Started with Selenium Grid & Docker
#TestWarez2019What is Selenium Grid
Selenium Grid is a smart proxy server that allows Selenium tests
to route commands to remote web browser instances. Its aim is to
provide an easy way to run tests in parallel on multiple machines.
With Selenium Grid, one server acts as the hub that routes JSON
formatted test commands to one or more registered Grid nodes.
Tests contact the hub to obtain access to remote browser
instances. The hub has a list of registered servers that it provides
access to, and allows us to control these instances. Selenium Grid
allows us to run tests in parallel on multiple machines, and to
manage different browser versions and browser configurations
centrally (instead of in each individual test). Selenium Grid isn't a
silver bullet. It solves a subset of common delegation and
distribution problems, but will for example not manage your
infrastructure and might not suit your specific needs.
Selenium Grid
a *SeleniumHQ Documentation
Diagram from https://www.ranorex.com
#TestWarez2019What is Selenium Hub and Nodes
• Intermediary and manager
• Accepts requests to run tests
• Takes instructions from client and executes them
remotely on the nodes
• Manages threads
Hub
a *SeleniumHQ Documentation
• This is where the browsers live
• Registers itself to the hub and communicates its
capabilities
• Receives requests from the hub and executes
them
Nodes
#TestWarez2019Docker Selenium Grid
• Selenium hub image
• Selenium node-firefox image
• Selenium node-chrome image
• Selenium node-firefox-debug image
• Selenium node-chrome-debug image
Selenium Images
a *SeleniumHQ Documentation
As normal grid with docker we have to install the
hub and browser nodes into Docker containers and
then start the hub and nodes from the Docker
container.
Selenium Grid with Docker
#TestWarez2019Prepare Sample Tests
Run tests:
Open a terminal
Clone this project
~$ git clone https://github.com/sargissargsyan/selenium-parallel-run.git
cd selenium-parallel-run
mvn clean install -DskipTests
mvn test
#TestWarez2019How to Dockerize Parallel Execution of Selenium Tests
Demo
 Setup Selenium Docker locally
Selenium Docker
#TestWarez2019How to Dockerize Parallel Execution of Selenium Tests
~$ docker -v
Docker version 18.09.2, build 6247962
java version "1.8.0_191" Java(TM) SE Runtime Environment
~$ java -version
Apache Maven 3.6.0
~$ mvn -v
docker-machine version 0.16.1, build cce350d7
~$ docker-machine -v
docker-compose version 1.23.2, build 1110ad01
~$ docker-compose -v
#TestWarez2019How to Dockerize Parallel Execution of Selenium Tests
~$ docker network create grid
#TestWarez2019How to Dockerize Parallel Execution of Selenium Tests
~$ docker run -d -p 4444:4444 --net grid --name selenium-hub
selenium/hub:3.141.59-vanadium
#TestWarez2019How to Dockerize Parallel Execution of Selenium Tests
~$ docker run -d --net grid -e HUB_HOST=selenium-hub -v /dev/
shm:/dev/shm selenium/node-chrome:3.141.59-vanadium
#TestWarez2019How to Dockerize Parallel Execution of Selenium Tests
#TestWarez2019How to Dockerize Parallel Execution of Selenium Tests
~$ docker network rm grid
~$ docker stop selenium-hub
~$ docker rm selenium-hub
~$ docker stop chrome-node
~$ docker rm chrome-node
#TestWarez2019Selenium Docker up using Docker Compose
~$ cd /selenium-parallel-run
~$ docker-compose -f docker-compose-selenium-docker.yml up -d
~$ docker-compose -f docker-compose-selenium-docker down
#TestWarez2019Selenium Docker up using Docker Compose
Demo
 A flexible and scalable Selenium Grid
Zalenium
#TestWarez2019How to Build Zealenium?
 Zalenium works conceptually in a simple way
a * Zalenium
~$ docker pull elgalu/selenium
~$ docker pull dosel/zalenium
#TestWarez2019How to Build Zealenium?
 Zalenium works conceptually in a simple way
a * Zalenium
~$ docker run --rm -ti --name zalenium -p 4444:4444 
-v /var/run/docker.sock:/var/run/docker.sock 
-v /tmp/videos:/home/seluser/videos 
—privileged dosel/zalenium start
#TestWarez2019Zalenium up using Docker Compose
~$ cd /selenium-parallel-run
~$ docker-compose -f docker-compose-zalenium.yml up --force-recreate -d
~$ docker-compose -f docker-compose-zalenium.yml down
#TestWarez2019Zalenium up using Docker Compose
Demo
 Selenoid
#TestWarez2019Pre steps
Install Configuration Manager script
~$ curl -s https://aerokube.com/cm/bash | bash
Run Selenoid
~$ ./cm selenoid start --vnc
Pull browser image
~$ docker pull selenoid/vnc_chrome:71.0
Run Selenoid UI
~$ ./cm selenoid-ui start
#TestWarez2019Selenoid
Demo
#TestWarez2019Links
https://github.com/SeleniumHQ/docker-selenium
https://opensource.zalando.com/zalenium/
https://aerokube.com/selenoid/latest/
https://aerokube.com/cm/latest/
#TestWarez2019Thank You!
Ñ
sargis.sargsyan@live.com
t
@sargiset
ą
/in/sargissargsyan

More Related Content

What's hot

Test Automation Infrastructure with Containers
Test Automation Infrastructure with ContainersTest Automation Infrastructure with Containers
Test Automation Infrastructure with Containers
Manoj Kumar Kumar
 
Selenium lightning-talk
Selenium lightning-talkSelenium lightning-talk
Selenium lightning-talk
Stephen Donner
 
Continuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and JenkinsContinuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and Jenkins
Francesco Bruni
 
Scalable QA With Docker
Scalable QA With DockerScalable QA With Docker
Scalable QA With Docker
Maarten van den Ende
 
Let’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkinsLet’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkins
Tomohide Kakeya
 
Continuous Delivery Pipeline with Docker and Jenkins
Continuous Delivery Pipeline with Docker and JenkinsContinuous Delivery Pipeline with Docker and Jenkins
Continuous Delivery Pipeline with Docker and Jenkins
Camilo Ribeiro
 
Docker and Selenoid - Make Autotests Great Again
Docker and Selenoid - Make Autotests Great Again Docker and Selenoid - Make Autotests Great Again
Docker and Selenoid - Make Autotests Great Again
COMAQA.BY
 
Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)Dennys Hsieh
 
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
 Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
IndicThreads
 
Javaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with JenkinsJavaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with Jenkins
Andy Pemberton
 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with Docker
HanoiJUG
 
Building Jenkins Pipelines at Scale
Building Jenkins Pipelines at ScaleBuilding Jenkins Pipelines at Scale
Building Jenkins Pipelines at Scale
Julien Pivotto
 
Jenkins Docker
Jenkins DockerJenkins Docker
Jenkins Docker
Alex Soto
 
CI/CD with Docker on AWS
CI/CD with Docker on AWSCI/CD with Docker on AWS
CI/CD with Docker on AWS
Hart Hoover
 
Exploring Docker in CI/CD
Exploring Docker in CI/CDExploring Docker in CI/CD
Exploring Docker in CI/CD
Henry Huang
 
How to Install and Configure Jenkins on Centos 7
How to Install and Configure Jenkins on Centos 7How to Install and Configure Jenkins on Centos 7
How to Install and Configure Jenkins on Centos 7
AniketGoyal14
 
Kloud
KloudKloud
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using Jenkins
Cliffano Subagio
 
Rise of the Machines - Automate your Development
Rise of the Machines - Automate your DevelopmentRise of the Machines - Automate your Development
Rise of the Machines - Automate your Development
Sven Peters
 
Automated android testing using jenkins ci
Automated android testing using jenkins ciAutomated android testing using jenkins ci
Automated android testing using jenkins ci
sveinungkb
 

What's hot (20)

Test Automation Infrastructure with Containers
Test Automation Infrastructure with ContainersTest Automation Infrastructure with Containers
Test Automation Infrastructure with Containers
 
Selenium lightning-talk
Selenium lightning-talkSelenium lightning-talk
Selenium lightning-talk
 
Continuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and JenkinsContinuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and Jenkins
 
Scalable QA With Docker
Scalable QA With DockerScalable QA With Docker
Scalable QA With Docker
 
Let’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkinsLet’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkins
 
Continuous Delivery Pipeline with Docker and Jenkins
Continuous Delivery Pipeline with Docker and JenkinsContinuous Delivery Pipeline with Docker and Jenkins
Continuous Delivery Pipeline with Docker and Jenkins
 
Docker and Selenoid - Make Autotests Great Again
Docker and Selenoid - Make Autotests Great Again Docker and Selenoid - Make Autotests Great Again
Docker and Selenoid - Make Autotests Great Again
 
Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)
 
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
 Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
 
Javaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with JenkinsJavaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with Jenkins
 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with Docker
 
Building Jenkins Pipelines at Scale
Building Jenkins Pipelines at ScaleBuilding Jenkins Pipelines at Scale
Building Jenkins Pipelines at Scale
 
Jenkins Docker
Jenkins DockerJenkins Docker
Jenkins Docker
 
CI/CD with Docker on AWS
CI/CD with Docker on AWSCI/CD with Docker on AWS
CI/CD with Docker on AWS
 
Exploring Docker in CI/CD
Exploring Docker in CI/CDExploring Docker in CI/CD
Exploring Docker in CI/CD
 
How to Install and Configure Jenkins on Centos 7
How to Install and Configure Jenkins on Centos 7How to Install and Configure Jenkins on Centos 7
How to Install and Configure Jenkins on Centos 7
 
Kloud
KloudKloud
Kloud
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using Jenkins
 
Rise of the Machines - Automate your Development
Rise of the Machines - Automate your DevelopmentRise of the Machines - Automate your Development
Rise of the Machines - Automate your Development
 
Automated android testing using jenkins ci
Automated android testing using jenkins ciAutomated android testing using jenkins ci
Automated android testing using jenkins ci
 

Similar to Getting Started with Dockerization of Selenium Tests Execution - Testwarez 2019

Zalenium - How to run Selenium Script using Docker and Selenium Grid
Zalenium - How to run Selenium Script using Docker and Selenium GridZalenium - How to run Selenium Script using Docker and Selenium Grid
Zalenium - How to run Selenium Script using Docker and Selenium Grid
Moataz Nabil
 
Be flexible with zalenium, a dockerized selenium grid infrastructure
Be flexible with zalenium, a dockerized selenium grid infrastructureBe flexible with zalenium, a dockerized selenium grid infrastructure
Be flexible with zalenium, a dockerized selenium grid infrastructure
Georgios Romanas
 
Kubernetes your tests! automation with docker on google cloud platform
Kubernetes your tests! automation with docker on google cloud platformKubernetes your tests! automation with docker on google cloud platform
Kubernetes your tests! automation with docker on google cloud platform
LivePerson
 
Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011camp_drupal_ua
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
Sachin-QA
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
ANKUR-BA
 
Python selenium
Python seleniumPython selenium
Python selenium
Ducat
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
Nikhil Kapoor
 
Testing world selenium_start_chapter1 (1)
Testing world selenium_start_chapter1 (1)Testing world selenium_start_chapter1 (1)
Testing world selenium_start_chapter1 (1)
Testing World
 
Integration and Acceptance Testing
Integration and Acceptance TestingIntegration and Acceptance Testing
Integration and Acceptance Testing
Alan Hecht
 
Selenium Web Driver Tutorial for Cross Browser Testing
Selenium Web Driver Tutorial for Cross Browser TestingSelenium Web Driver Tutorial for Cross Browser Testing
Selenium Web Driver Tutorial for Cross Browser Testing
Sarah Elson
 
Basics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote ControlBasics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote Control
usha kannappan
 
Selenium Introduction and IDE
Selenium Introduction and IDESelenium Introduction and IDE
Selenium Introduction and IDE
Murageppa-QA
 
Selenium Training
Selenium  Training  Selenium  Training
Selenium Training
zasi besant
 
Automated UI testing. Selenium. DrupalCamp Kyiv 2011
Automated UI testing. Selenium. DrupalCamp Kyiv 2011Automated UI testing. Selenium. DrupalCamp Kyiv 2011
Automated UI testing. Selenium. DrupalCamp Kyiv 2011
Yuriy Gerasimov
 
How to use Selenium Grid for Multi-Browser Testing.pdf
How to use Selenium Grid for Multi-Browser Testing.pdfHow to use Selenium Grid for Multi-Browser Testing.pdf
How to use Selenium Grid for Multi-Browser Testing.pdf
pcloudy2
 
Testing with Jenkins, Selenium and Continuous Deployment
Testing with Jenkins, Selenium and Continuous DeploymentTesting with Jenkins, Selenium and Continuous Deployment
Testing with Jenkins, Selenium and Continuous Deployment
Max Klymyshyn
 
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Edureka!
 
Parallel Running Automation Solution with Docker, Jenkins and Zalenium
Parallel Running Automation Solution with Docker, Jenkins and ZaleniumParallel Running Automation Solution with Docker, Jenkins and Zalenium
Parallel Running Automation Solution with Docker, Jenkins and Zalenium
Evozon Test Lab
 

Similar to Getting Started with Dockerization of Selenium Tests Execution - Testwarez 2019 (20)

Zalenium - How to run Selenium Script using Docker and Selenium Grid
Zalenium - How to run Selenium Script using Docker and Selenium GridZalenium - How to run Selenium Script using Docker and Selenium Grid
Zalenium - How to run Selenium Script using Docker and Selenium Grid
 
Be flexible with zalenium, a dockerized selenium grid infrastructure
Be flexible with zalenium, a dockerized selenium grid infrastructureBe flexible with zalenium, a dockerized selenium grid infrastructure
Be flexible with zalenium, a dockerized selenium grid infrastructure
 
Kubernetes your tests! automation with docker on google cloud platform
Kubernetes your tests! automation with docker on google cloud platformKubernetes your tests! automation with docker on google cloud platform
Kubernetes your tests! automation with docker on google cloud platform
 
Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
 
Python selenium
Python seleniumPython selenium
Python selenium
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
 
Sel
SelSel
Sel
 
Testing world selenium_start_chapter1 (1)
Testing world selenium_start_chapter1 (1)Testing world selenium_start_chapter1 (1)
Testing world selenium_start_chapter1 (1)
 
Integration and Acceptance Testing
Integration and Acceptance TestingIntegration and Acceptance Testing
Integration and Acceptance Testing
 
Selenium Web Driver Tutorial for Cross Browser Testing
Selenium Web Driver Tutorial for Cross Browser TestingSelenium Web Driver Tutorial for Cross Browser Testing
Selenium Web Driver Tutorial for Cross Browser Testing
 
Basics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote ControlBasics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote Control
 
Selenium Introduction and IDE
Selenium Introduction and IDESelenium Introduction and IDE
Selenium Introduction and IDE
 
Selenium Training
Selenium  Training  Selenium  Training
Selenium Training
 
Automated UI testing. Selenium. DrupalCamp Kyiv 2011
Automated UI testing. Selenium. DrupalCamp Kyiv 2011Automated UI testing. Selenium. DrupalCamp Kyiv 2011
Automated UI testing. Selenium. DrupalCamp Kyiv 2011
 
How to use Selenium Grid for Multi-Browser Testing.pdf
How to use Selenium Grid for Multi-Browser Testing.pdfHow to use Selenium Grid for Multi-Browser Testing.pdf
How to use Selenium Grid for Multi-Browser Testing.pdf
 
Testing with Jenkins, Selenium and Continuous Deployment
Testing with Jenkins, Selenium and Continuous DeploymentTesting with Jenkins, Selenium and Continuous Deployment
Testing with Jenkins, Selenium and Continuous Deployment
 
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
 
Parallel Running Automation Solution with Docker, Jenkins and Zalenium
Parallel Running Automation Solution with Docker, Jenkins and ZaleniumParallel Running Automation Solution with Docker, Jenkins and Zalenium
Parallel Running Automation Solution with Docker, Jenkins and Zalenium
 

More from Sargis Sargsyan

Let’s Talk About Quality Engineering
Let’s Talk About Quality EngineeringLet’s Talk About Quality Engineering
Let’s Talk About Quality Engineering
Sargis Sargsyan
 
Your Road to Quality Assurance
Your Road to Quality AssuranceYour Road to Quality Assurance
Your Road to Quality Assurance
Sargis Sargsyan
 
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
Sargis Sargsyan
 
Test Data Preparation: Tips and Tricks - SQA Days 22 - Saint Petersburg
Test Data Preparation: Tips and Tricks - SQA Days 22 - Saint PetersburgTest Data Preparation: Tips and Tricks - SQA Days 22 - Saint Petersburg
Test Data Preparation: Tips and Tricks - SQA Days 22 - Saint Petersburg
Sargis Sargsyan
 
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Sargis Sargsyan
 
Better Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternBetter Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component Pattern
Sargis Sargsyan
 
Agile Testing
Agile TestingAgile Testing
Agile Testing
Sargis Sargsyan
 
Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015
Sargis Sargsyan
 
Web Application Testing with Selenium
Web Application Testing with Selenium Web Application Testing with Selenium
Web Application Testing with Selenium
Sargis Sargsyan
 
QA MeetUp Yerevan - Aug 25
QA MeetUp Yerevan - Aug 25QA MeetUp Yerevan - Aug 25
QA MeetUp Yerevan - Aug 25
Sargis Sargsyan
 

More from Sargis Sargsyan (10)

Let’s Talk About Quality Engineering
Let’s Talk About Quality EngineeringLet’s Talk About Quality Engineering
Let’s Talk About Quality Engineering
 
Your Road to Quality Assurance
Your Road to Quality AssuranceYour Road to Quality Assurance
Your Road to Quality Assurance
 
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
 
Test Data Preparation: Tips and Tricks - SQA Days 22 - Saint Petersburg
Test Data Preparation: Tips and Tricks - SQA Days 22 - Saint PetersburgTest Data Preparation: Tips and Tricks - SQA Days 22 - Saint Petersburg
Test Data Preparation: Tips and Tricks - SQA Days 22 - Saint Petersburg
 
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
 
Better Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternBetter Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component Pattern
 
Agile Testing
Agile TestingAgile Testing
Agile Testing
 
Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015
 
Web Application Testing with Selenium
Web Application Testing with Selenium Web Application Testing with Selenium
Web Application Testing with Selenium
 
QA MeetUp Yerevan - Aug 25
QA MeetUp Yerevan - Aug 25QA MeetUp Yerevan - Aug 25
QA MeetUp Yerevan - Aug 25
 

Recently uploaded

Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
Kamal Acharya
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
yokeleetan1
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
manasideore6
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
drwaing
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABSDESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
itech2017
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Soumen Santra
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
Kamal Acharya
 

Recently uploaded (20)

Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABSDESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
 

Getting Started with Dockerization of Selenium Tests Execution - Testwarez 2019

  • 1. Getting Started with Dockerization of Selenium Tests Execution Sargis Sargsyan, Testwarez, Poland 2019 
  • 2. 2 Sargis Sargsyan Director, Quality Assurance at PicsArt
  • 3. #TestWarez2019 3 Introduction to Presentation 1 Why? 2 What is Selenium Grid 3 Running Selenium Suite in Parallel 4 What is Docker Selenium 5 Configure Selenium Grid in Docker Containers 6 Creating and maintaining   docker-compose file 7 Zalenium  9 Q&A8 Selenoid
  • 4.  Why? Don’t you have an answer yet?
  • 5. #TestWarez2019Why we need to Dockerize Selenium Run Run in different environment Easy to setup Secure More Stability No need to manage Selenium server jar No need to download drivers, as it is done automatically You Do Not Need to Make the Switch to Parallel Testing All at Once Capacity to Scale (Parallel Running)
  • 6. #TestWarez2019Reasons to Start Running Tests in Parallel Test for wider Compatibility Can radically reduce testing time Optimizes continuous integration and delivery Cost effective testing Enables teams to focus on making tests repeatable, measurable and accurate You can still perform sequential tests, when needed You Do Not Need to Make the Switch to Parallel Testing All at Once
  • 7.  Getting Started with Selenium Grid & Docker
  • 8. #TestWarez2019What is Selenium Grid Selenium Grid is a smart proxy server that allows Selenium tests to route commands to remote web browser instances. Its aim is to provide an easy way to run tests in parallel on multiple machines. With Selenium Grid, one server acts as the hub that routes JSON formatted test commands to one or more registered Grid nodes. Tests contact the hub to obtain access to remote browser instances. The hub has a list of registered servers that it provides access to, and allows us to control these instances. Selenium Grid allows us to run tests in parallel on multiple machines, and to manage different browser versions and browser configurations centrally (instead of in each individual test). Selenium Grid isn't a silver bullet. It solves a subset of common delegation and distribution problems, but will for example not manage your infrastructure and might not suit your specific needs. Selenium Grid a *SeleniumHQ Documentation Diagram from https://www.ranorex.com
  • 9. #TestWarez2019What is Selenium Hub and Nodes • Intermediary and manager • Accepts requests to run tests • Takes instructions from client and executes them remotely on the nodes • Manages threads Hub a *SeleniumHQ Documentation • This is where the browsers live • Registers itself to the hub and communicates its capabilities • Receives requests from the hub and executes them Nodes
  • 10. #TestWarez2019Docker Selenium Grid • Selenium hub image • Selenium node-firefox image • Selenium node-chrome image • Selenium node-firefox-debug image • Selenium node-chrome-debug image Selenium Images a *SeleniumHQ Documentation As normal grid with docker we have to install the hub and browser nodes into Docker containers and then start the hub and nodes from the Docker container. Selenium Grid with Docker
  • 11. #TestWarez2019Prepare Sample Tests Run tests: Open a terminal Clone this project ~$ git clone https://github.com/sargissargsyan/selenium-parallel-run.git cd selenium-parallel-run mvn clean install -DskipTests mvn test
  • 12. #TestWarez2019How to Dockerize Parallel Execution of Selenium Tests Demo
  • 13.  Setup Selenium Docker locally Selenium Docker
  • 14. #TestWarez2019How to Dockerize Parallel Execution of Selenium Tests ~$ docker -v Docker version 18.09.2, build 6247962 java version "1.8.0_191" Java(TM) SE Runtime Environment ~$ java -version Apache Maven 3.6.0 ~$ mvn -v docker-machine version 0.16.1, build cce350d7 ~$ docker-machine -v docker-compose version 1.23.2, build 1110ad01 ~$ docker-compose -v
  • 15. #TestWarez2019How to Dockerize Parallel Execution of Selenium Tests ~$ docker network create grid
  • 16. #TestWarez2019How to Dockerize Parallel Execution of Selenium Tests ~$ docker run -d -p 4444:4444 --net grid --name selenium-hub selenium/hub:3.141.59-vanadium
  • 17. #TestWarez2019How to Dockerize Parallel Execution of Selenium Tests ~$ docker run -d --net grid -e HUB_HOST=selenium-hub -v /dev/ shm:/dev/shm selenium/node-chrome:3.141.59-vanadium
  • 18. #TestWarez2019How to Dockerize Parallel Execution of Selenium Tests
  • 19. #TestWarez2019How to Dockerize Parallel Execution of Selenium Tests ~$ docker network rm grid ~$ docker stop selenium-hub ~$ docker rm selenium-hub ~$ docker stop chrome-node ~$ docker rm chrome-node
  • 20. #TestWarez2019Selenium Docker up using Docker Compose ~$ cd /selenium-parallel-run ~$ docker-compose -f docker-compose-selenium-docker.yml up -d ~$ docker-compose -f docker-compose-selenium-docker down
  • 21. #TestWarez2019Selenium Docker up using Docker Compose Demo
  • 22.  A flexible and scalable Selenium Grid Zalenium
  • 23. #TestWarez2019How to Build Zealenium?  Zalenium works conceptually in a simple way a * Zalenium ~$ docker pull elgalu/selenium ~$ docker pull dosel/zalenium
  • 24. #TestWarez2019How to Build Zealenium?  Zalenium works conceptually in a simple way a * Zalenium ~$ docker run --rm -ti --name zalenium -p 4444:4444 -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/videos:/home/seluser/videos —privileged dosel/zalenium start
  • 25. #TestWarez2019Zalenium up using Docker Compose ~$ cd /selenium-parallel-run ~$ docker-compose -f docker-compose-zalenium.yml up --force-recreate -d ~$ docker-compose -f docker-compose-zalenium.yml down
  • 26. #TestWarez2019Zalenium up using Docker Compose Demo
  • 28. #TestWarez2019Pre steps Install Configuration Manager script ~$ curl -s https://aerokube.com/cm/bash | bash Run Selenoid ~$ ./cm selenoid start --vnc Pull browser image ~$ docker pull selenoid/vnc_chrome:71.0 Run Selenoid UI ~$ ./cm selenoid-ui start