SlideShare a Scribd company logo
How to Dockerize Parallel Execution of Selenium Tests
Sargis Sargsyan

Workshop, SQA Days EU, Latvia 2019
2
Sargis Sargsyan
Director, Quality Assurance at PicsArt
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
 Getting Started with Selenium Grid & Docker
5
What 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
6
What 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
7
Docker 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
Prepare 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 failsafe:integration-test
 Setup Selenium Docker locally
Selenium Docker
How to Dockerize Parallel Execution of Selenium 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 failsafe:integration-test -Dselenium.remote=false
How to Dockerize Parallel Execution of Selenium Tests
Demo
12
How to Dockerize Parallel Execution of Selenium Tests
~$ docker -v
Docker version 18.09.2, build 6247962
13
How to Dockerize Parallel Execution of Selenium Tests
java version "1.8.0_191" Java(TM) SE Runtime
Environment (build 1.8.0_191-b12) Java HotSpot(TM)
64-Bit Server VM (build 25.191-b12, mixed mode)
~$ java -version
14
How to Dockerize Parallel Execution of Selenium Tests
Apache Maven 3.6.0
(97c98ec64a1fdfee7767ce5ffb20918da4f719f3;
2018-10-24T22:41:47+04:00)
~$ mvn -v
15
How to Dockerize Parallel Execution of Selenium Tests
docker-compose version 1.23.2, build 1110ad01
~$ docker-compose -v
16
How to Dockerize Parallel Execution of Selenium Tests
docker-machine version 0.16.1, build cce350d7
~$ docker-machine -v
How to Dockerize Parallel Execution of Selenium Tests
~$ docker network create grid
18
How to Dockerize Parallel Execution of Selenium Tests
~$ docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/
standalone-chrome:3.141.59-lithium
19
How 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-lithium
How to Dockerize Parallel Execution of Selenium Tests
How to Dockerize Parallel Execution of Selenium Tests
Demo
How 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
Selenium 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
Selenium Docker up using Docker Compose
Demo
 A flexible and scalable Selenium Grid
Zalenium
26
How to Build Zealenium?
 Zalenium works conceptually in a simple way
a * Zalenium
~$ docker pull elgalu/selenium
~$ docker pull dosel/zalenium
27
How 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
How to Dockerize Parallel Execution of Selenium Tests
Demo
Zalenium 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
Zalenium up using Docker Compose
Demo
 Selenoid
32
Pre steps
Create a directory with name selenoid
~$ mkdir selenoid
Create browsers.config file
~$ mkdir config
~$ touch config/browsers.json
Change directory to selenoid
~$ cd selenoid/
Edit browsers.config file
~$ nano browsers.config
browser.json
{
"chrome": {
"default": "72.0",
"versions": {
"72.0": {
"image": "selenoid/vnc:chrome_72.0",
"port": "4444",
"path": "/"
}
}
}
}
34
How to Build Selenoid?
~/selenoid$ docker run -d 
--name selenoid 
-p 4444:4444 
-v /var/run/docker.sock:/var/run/docker.sock 
-v `pwd`/config/:/etc/selenoid/:ro 
aerokube/selenoid:latest-release
Selenoid
Demo
36
How to Build selenoid-ui?
~/$ docker run -d --name selenoid-ui 
--link selenoid 
-p 8080:8080 
aerokube/selenoid-ui --selenoid-uri=http://selenoid:4444
Selenoid
Demo
38
How to Build Selenoid with Configuration Manager?
~/$ curl -s https://aerokube.com/cm/bash | bash
~/$ ./cm selenoid start --vnc
> ./cm.exe selenoid start --vnc
https://github.com/aerokube/cm/releases
~/$ ./cm selenoid-ui start
Selenoid
Demo
40
Links
https://github.com/SeleniumHQ/docker-selenium
https://opensource.zalando.com/zalenium/
https://aerokube.com/selenoid/latest/
https://aerokube.com/cm/latest/
41
Thank You!
Ñ
sargis.sargsyan@live.com
t
@sargiset
ą
/in/sargissargsyan

More Related Content

What's hot

Selenium lightning-talk
Selenium lightning-talkSelenium lightning-talk
Selenium lightning-talk
Stephen Donner
 
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
 
Java Day Kharkiv - Next-gen engineering with Docker and Kubernetes
Java Day Kharkiv - Next-gen engineering with Docker and KubernetesJava Day Kharkiv - Next-gen engineering with Docker and Kubernetes
Java Day Kharkiv - Next-gen engineering with Docker and Kubernetes
Antons Kranga
 
selenium grid & docker
selenium grid & dockerselenium grid & docker
selenium grid & docker
Łukasz Rosłonek
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
Troublemaker Khunpech
 
Jenkins & IaC
Jenkins & IaCJenkins & IaC
Jenkins & IaC
HungWei Chiu
 
МИХАЙЛО ЗЕНІН «Dockerizing environment for mobile test automation. Scaling fr...
МИХАЙЛО ЗЕНІН «Dockerizing environment for mobile test automation. Scaling fr...МИХАЙЛО ЗЕНІН «Dockerizing environment for mobile test automation. Scaling fr...
МИХАЙЛО ЗЕНІН «Dockerizing environment for mobile test automation. Scaling fr...
QADay
 
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
QADay
 
Continuous Integration With Jenkins Docker SQL Server
Continuous Integration With Jenkins Docker SQL ServerContinuous Integration With Jenkins Docker SQL Server
Continuous Integration With Jenkins Docker SQL Server
Chris Adkin
 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with Docker
HanoiJUG
 
Next-gen DevOps engineering with Docker and Kubernetes by Antons Kranga
Next-gen DevOps engineering with Docker and Kubernetes by Antons KrangaNext-gen DevOps engineering with Docker and Kubernetes by Antons Kranga
Next-gen DevOps engineering with Docker and Kubernetes by Antons Kranga
JavaDayUA
 
Jenkins Docker
Jenkins DockerJenkins Docker
Jenkins Docker
Alex Soto
 
CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
CI and CD at Scale: Scaling Jenkins with Docker and Apache MesosCI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
Carlos Sanchez
 
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
 
Enabling Microservices @Orbitz - DockerCon 2015
Enabling Microservices @Orbitz - DockerCon 2015Enabling Microservices @Orbitz - DockerCon 2015
Enabling Microservices @Orbitz - DockerCon 2015
Steve Hoffman
 
Selenium Grid & Docker - budowa środowiska do testów przeglądarkowych
Selenium Grid & Docker - budowa środowiska do testów przeglądarkowychSelenium Grid & Docker - budowa środowiska do testów przeglądarkowych
Selenium Grid & Docker - budowa środowiska do testów przeglądarkowych
Łukasz Rosłonek
 
DCEU 18: How To Build Your Containerization Strategy
DCEU 18: How To Build Your Containerization StrategyDCEU 18: How To Build Your Containerization Strategy
DCEU 18: How To Build Your Containerization Strategy
Docker, Inc.
 
CI, CD with Docker, Jenkins and Tutum
CI, CD with Docker, Jenkins and TutumCI, CD with Docker, Jenkins and Tutum
CI, CD with Docker, Jenkins and Tutum
Sreenivas Makam
 
Testing with Docker
Testing with DockerTesting with Docker
Testing with Docker
toffermann
 

What's hot (20)

Selenium lightning-talk
Selenium lightning-talkSelenium lightning-talk
Selenium lightning-talk
 
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
 
Java Day Kharkiv - Next-gen engineering with Docker and Kubernetes
Java Day Kharkiv - Next-gen engineering with Docker and KubernetesJava Day Kharkiv - Next-gen engineering with Docker and Kubernetes
Java Day Kharkiv - Next-gen engineering with Docker and Kubernetes
 
selenium grid & docker
selenium grid & dockerselenium grid & docker
selenium grid & docker
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
 
Jenkins & IaC
Jenkins & IaCJenkins & IaC
Jenkins & IaC
 
МИХАЙЛО ЗЕНІН «Dockerizing environment for mobile test automation. Scaling fr...
МИХАЙЛО ЗЕНІН «Dockerizing environment for mobile test automation. Scaling fr...МИХАЙЛО ЗЕНІН «Dockerizing environment for mobile test automation. Scaling fr...
МИХАЙЛО ЗЕНІН «Dockerizing environment for mobile test automation. Scaling fr...
 
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
 
Continuous Integration With Jenkins Docker SQL Server
Continuous Integration With Jenkins Docker SQL ServerContinuous Integration With Jenkins Docker SQL Server
Continuous Integration With Jenkins Docker SQL Server
 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with Docker
 
Next-gen DevOps engineering with Docker and Kubernetes by Antons Kranga
Next-gen DevOps engineering with Docker and Kubernetes by Antons KrangaNext-gen DevOps engineering with Docker and Kubernetes by Antons Kranga
Next-gen DevOps engineering with Docker and Kubernetes by Antons Kranga
 
Jenkins Docker
Jenkins DockerJenkins Docker
Jenkins Docker
 
CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
CI and CD at Scale: Scaling Jenkins with Docker and Apache MesosCI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
 
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
 
Enabling Microservices @Orbitz - DockerCon 2015
Enabling Microservices @Orbitz - DockerCon 2015Enabling Microservices @Orbitz - DockerCon 2015
Enabling Microservices @Orbitz - DockerCon 2015
 
Perlbrew
PerlbrewPerlbrew
Perlbrew
 
Selenium Grid & Docker - budowa środowiska do testów przeglądarkowych
Selenium Grid & Docker - budowa środowiska do testów przeglądarkowychSelenium Grid & Docker - budowa środowiska do testów przeglądarkowych
Selenium Grid & Docker - budowa środowiska do testów przeglądarkowych
 
DCEU 18: How To Build Your Containerization Strategy
DCEU 18: How To Build Your Containerization StrategyDCEU 18: How To Build Your Containerization Strategy
DCEU 18: How To Build Your Containerization Strategy
 
CI, CD with Docker, Jenkins and Tutum
CI, CD with Docker, Jenkins and TutumCI, CD with Docker, Jenkins and Tutum
CI, CD with Docker, Jenkins and Tutum
 
Testing with Docker
Testing with DockerTesting with Docker
Testing with Docker
 

Similar to How to Dockerize Parallel Execution of Selenium Tests - SQA Days EU, Rgia, Latvia

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
 
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
 
vodQA(Pune) 2018 - Docker in Testing
vodQA(Pune) 2018 - Docker in TestingvodQA(Pune) 2018 - Docker in Testing
vodQA(Pune) 2018 - Docker in Testing
vodQA
 
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
 
Session on Launching Selenium Grid and Running tests using docker compose and...
Session on Launching Selenium Grid and Running tests using docker compose and...Session on Launching Selenium Grid and Running tests using docker compose and...
Session on Launching Selenium Grid and Running tests using docker compose and...
Agile Testing Alliance
 
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
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
Sachin-QA
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
ANKUR-BA
 
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
 
Scalable QA With Docker
Scalable QA With DockerScalable QA With Docker
Scalable QA With Docker
Maarten van den Ende
 
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 with Selenium
Automated UI testing with SeleniumAutomated UI testing with Selenium
Automated UI testing with Selenium
Yuriy Gerasimov
 
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
 
Selenium
SeleniumSelenium
Selenium
tanvir afzal
 
Tanvir Afzal: Selenium
Tanvir Afzal: SeleniumTanvir Afzal: Selenium
Tanvir Afzal: SeleniumSQABD
 
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
 
Integration and Acceptance Testing
Integration and Acceptance TestingIntegration and Acceptance Testing
Integration and Acceptance Testing
Alan Hecht
 
Continuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECSContinuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECS
Amazon Web Services
 
Selenium Introduction and IDE
Selenium Introduction and IDESelenium Introduction and IDE
Selenium Introduction and IDE
Murageppa-QA
 

Similar to How to Dockerize Parallel Execution of Selenium Tests - SQA Days EU, Rgia, Latvia (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
 
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
 
vodQA(Pune) 2018 - Docker in Testing
vodQA(Pune) 2018 - Docker in TestingvodQA(Pune) 2018 - Docker in Testing
vodQA(Pune) 2018 - Docker in Testing
 
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
 
Session on Launching Selenium Grid and Running tests using docker compose and...
Session on Launching Selenium Grid and Running tests using docker compose and...Session on Launching Selenium Grid and Running tests using docker compose and...
Session on Launching Selenium Grid and Running tests using docker compose and...
 
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
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
 
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
 
Scalable QA With Docker
Scalable QA With DockerScalable QA With Docker
Scalable QA With Docker
 
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 with Selenium
Automated UI testing with SeleniumAutomated UI testing with Selenium
Automated UI testing with Selenium
 
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
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Tanvir Afzal: Selenium
Tanvir Afzal: SeleniumTanvir Afzal: Selenium
Tanvir Afzal: Selenium
 
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
 
Integration and Acceptance Testing
Integration and Acceptance TestingIntegration and Acceptance Testing
Integration and Acceptance Testing
 
Continuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECSContinuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECS
 
Selenium Introduction and IDE
Selenium Introduction and IDESelenium Introduction and IDE
Selenium Introduction and IDE
 

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
 
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...
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 (11)

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
 
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...
 
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

Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 

Recently uploaded (20)

Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 

How to Dockerize Parallel Execution of Selenium Tests - SQA Days EU, Rgia, Latvia

  • 1. How to Dockerize Parallel Execution of Selenium Tests Sargis Sargsyan  Workshop, SQA Days EU, Latvia 2019
  • 2. 2 Sargis Sargsyan Director, Quality Assurance at PicsArt
  • 3. 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.  Getting Started with Selenium Grid & Docker
  • 5. 5 What 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
  • 6. 6 What 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
  • 7. 7 Docker 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
  • 8. Prepare 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 failsafe:integration-test
  • 9.  Setup Selenium Docker locally Selenium Docker
  • 10. How to Dockerize Parallel Execution of Selenium 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 failsafe:integration-test -Dselenium.remote=false
  • 11. How to Dockerize Parallel Execution of Selenium Tests Demo
  • 12. 12 How to Dockerize Parallel Execution of Selenium Tests ~$ docker -v Docker version 18.09.2, build 6247962
  • 13. 13 How to Dockerize Parallel Execution of Selenium Tests java version "1.8.0_191" Java(TM) SE Runtime Environment (build 1.8.0_191-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode) ~$ java -version
  • 14. 14 How to Dockerize Parallel Execution of Selenium Tests Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T22:41:47+04:00) ~$ mvn -v
  • 15. 15 How to Dockerize Parallel Execution of Selenium Tests docker-compose version 1.23.2, build 1110ad01 ~$ docker-compose -v
  • 16. 16 How to Dockerize Parallel Execution of Selenium Tests docker-machine version 0.16.1, build cce350d7 ~$ docker-machine -v
  • 17. How to Dockerize Parallel Execution of Selenium Tests ~$ docker network create grid
  • 18. 18 How to Dockerize Parallel Execution of Selenium Tests ~$ docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/ standalone-chrome:3.141.59-lithium
  • 19. 19 How 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-lithium
  • 20. How to Dockerize Parallel Execution of Selenium Tests
  • 21. How to Dockerize Parallel Execution of Selenium Tests Demo
  • 22. How 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
  • 23. Selenium 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
  • 24. Selenium Docker up using Docker Compose Demo
  • 25.  A flexible and scalable Selenium Grid Zalenium
  • 26. 26 How to Build Zealenium?  Zalenium works conceptually in a simple way a * Zalenium ~$ docker pull elgalu/selenium ~$ docker pull dosel/zalenium
  • 27. 27 How 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
  • 28. How to Dockerize Parallel Execution of Selenium Tests Demo
  • 29. Zalenium 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
  • 30. Zalenium up using Docker Compose Demo
  • 32. 32 Pre steps Create a directory with name selenoid ~$ mkdir selenoid Create browsers.config file ~$ mkdir config ~$ touch config/browsers.json Change directory to selenoid ~$ cd selenoid/ Edit browsers.config file ~$ nano browsers.config
  • 33. browser.json { "chrome": { "default": "72.0", "versions": { "72.0": { "image": "selenoid/vnc:chrome_72.0", "port": "4444", "path": "/" } } } }
  • 34. 34 How to Build Selenoid? ~/selenoid$ docker run -d --name selenoid -p 4444:4444 -v /var/run/docker.sock:/var/run/docker.sock -v `pwd`/config/:/etc/selenoid/:ro aerokube/selenoid:latest-release
  • 36. 36 How to Build selenoid-ui? ~/$ docker run -d --name selenoid-ui --link selenoid -p 8080:8080 aerokube/selenoid-ui --selenoid-uri=http://selenoid:4444
  • 38. 38 How to Build Selenoid with Configuration Manager? ~/$ curl -s https://aerokube.com/cm/bash | bash ~/$ ./cm selenoid start --vnc > ./cm.exe selenoid start --vnc https://github.com/aerokube/cm/releases ~/$ ./cm selenoid-ui start