SlideShare uma empresa Scribd logo
1 de 41
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

Selenium lightning-talk
Selenium lightning-talkSelenium lightning-talk
Selenium lightning-talkStephen 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 & DockerIndicThreads
 
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 KubernetesAntons Kranga
 
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 ThailandTroublemaker Khunpech
 
МИХАЙЛО ЗЕНІН «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...GoQA
 
ДМИТРО БУДИМ «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...GoQA
 
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 ServerChris Adkin
 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with DockerHanoiJUG
 
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 KrangaJavaDayUA
 
Jenkins Docker
Jenkins DockerJenkins Docker
Jenkins DockerAlex 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 MesosCarlos 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 jenkinsTomohide Kakeya
 
Enabling Microservices @Orbitz - DockerCon 2015
Enabling Microservices @Orbitz - DockerCon 2015Enabling Microservices @Orbitz - DockerCon 2015
Enabling Microservices @Orbitz - DockerCon 2015Steve 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 StrategyDocker, 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 TutumSreenivas Makam
 
Testing with Docker
Testing with DockerTesting with Docker
Testing with Dockertoffermann
 

Mais procurados (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
 

Semelhante a 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 GridMoataz 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 TestingvodQA
 
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 infrastructureGeorgios 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 ZaleniumEvozon Test Lab
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - IntroductionSachin-QA
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - IntroductionANKUR-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 DeploymentMax Klymyshyn
 
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 platformLivePerson
 
Automated UI testing with Selenium
Automated UI testing with SeleniumAutomated UI testing with Selenium
Automated UI testing with SeleniumYuriy 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 2011Yuriy Gerasimov
 
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 TestingAlan 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 ECSAmazon Web Services
 
Selenium Introduction and IDE
Selenium Introduction and IDESelenium Introduction and IDE
Selenium Introduction and IDEMurageppa-QA
 

Semelhante a 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
 

Mais de Sargis Sargsyan

Let’s Talk About Quality Engineering
Let’s Talk About Quality EngineeringLet’s Talk About Quality Engineering
Let’s Talk About Quality EngineeringSargis Sargsyan
 
Your Road to Quality Assurance
Your Road to Quality AssuranceYour Road to Quality Assurance
Your Road to Quality AssuranceSargis 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 2019Sargis 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 PetersburgSargis 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 PatternSargis 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 2015Sargis 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 25Sargis Sargsyan
 

Mais de 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
 

Último

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Último (20)

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

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