SlideShare a Scribd company logo
1 of 45
Download to read offline
Easy Setup for Parallel Test Execution with Selenium Docker
Sargis Sargsyan

2
Sargis Sargsyan
Principal Software Engineer in Test
3
Introduction to Presentation
1 Why? 2 What is Selenium Grid 3 What is Docker Selenium
4
Configure Selenium Grid
in Docker Containers
5
Running Selenium Suite
in Parallel
6
Creating and maintaining
docker-compose file
7
View test execution using
debug nodes via VNC
9 Q&A8 Zalenium + Sauce Labs
 Why we should run our test in Parallel?
Why?
5
Why? Why we should run tests in Parallel
Running Selenium tests is slow. Parallel
testing is allowing us to speed up the test
runtime. Also it allows us to increase
coverage and run tests in different browser
on the same time.
Parallel Test Running
Possibility to test more than one
set of configurations
Save Time! Reduce the time of
test suite run
Cost per Test to run
More browser/OS coverage
Fast feedback
Less Manual Testing
6
Disadvantages
 What are the disadvantages of Selenium Grid
The performance of Selenium grid is low, in case if you are running large amount of the test and need large
amount of nodes
Setting up parallel running test suite requires time
In case of large amount of tests it will be necessary to divide the suite into parts and run them in
different machines
If the suite was divided to pars there will be some difficulties in analyzing statistics, as there will be
divided reports
As the code is executed on the same machine the test were launched and the machine only receives the
browser control commands. It is creating issues with uploading or downloading files
 What is Selenium Grid
8
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
9
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
10
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
 A flexible and scalable Selenium Grid
Zalenium
12
Zalenium A grid that scales using docker-selenium
Ƽ Hard to maintain a Selenium Grid
Ƽ
Allow anyone to have a disposable and flexible
Selenium Grid infrastructure
Why Zalenium?What is Zalenium?
Dinamic, on-demand Selenium Grid
Based on docker-selenium
Simple to setup and run
a * Zalenium
13
Zalenium Additional Features
 Get a grid up and running in a few seconds!
Test status and steps directly in the video
Basic auth grid protection when deploying Zalenium in the cloud (AWS, GCP, …)
Mount volumes across containers when you need to specific files in your tests
a * Zalenium
14
How It Works?
 Zalenium works conceptually in a simple way
a * Zalenium
15
How It Works?
 Zalenium works conceptually in a simple way
a * Zalenium
16
How to Build Zealenium?
 Zalenium works conceptually in a simple way
a * Zalenium
docker pull elgalu/selenium
docker pull dosel/zalenium
17
How to Build Zealenium?
 Zalenium works conceptually in a simple way
a * Zalenium
docker run --rm -ti --name zalenium -p 4444:4444 
-e DOCKER=17.06.2-ce 
-v /var/run/docker.sock:/var/run/docker.sock 
-v /tmp/videos:/home/seluser/videos 
--privileged dosel/zalenium start
 Zalenium works conceptually in a simple way
How to Build Zalenium?
20
How to Build Zealenium with docker-compose?
 Zalenium works conceptually in a simple way
a * Zalenium
# Usage:
# docker-compose up --force-recreate
version: '2.1'
services:
zalenium:
image: "dosel/zalenium"
container_name: zalenium
hostname: zalenium
tty: true
volumes:
- /tmp/videos:/home/seluser/videos
- /var/run/docker.sock:/var/run/docker.sock
- /usr/bin/docker:/usr/bin/docker
ports:
- 4444:4444
command: >
………………………….
………………………….
 Zalenium works conceptually in a simple way
How to Run Test?
23
How to Build Zalenium?
 Zalenium works conceptually in a simple way
 Zalenium works conceptually in a simple way
View browser via VNC in Zalenium?
 Cloud-hosted web and mobile application automation platform
Sauce Labs
28
Sauce Labs
 A flexible and scalable Selenium Grid
As the co-developers of Selenium, our
team maintains the most up-to-date and
reliable platform for web testing. Test
securely knowing that our experts can
help your organization build their test
automation strategy.
What is Sauce Labs
Ƽ Run Selenium tests in real browsers in cloud
Write test in most popular languages
Specify platform configuration
Spent less time to setting up and maintaining
your testing infrastructure
a * Sauce Labs
29
Sauce Labs
 A flexible and scalable Selenium Grid
a * Sauce Labs
30
How to Run Tests Against Sauce Labs?
 Cloud-hosted web and mobile application automation platform
 Cloud-hosted web and mobile application automation platform
How to Run Tests Against Sauce Labs?
 Redirect the test to a cloud testing provider
Zalenium + Sauce Labs
34
Zalenium + Sauce Labs
 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam.
If you need a capability that cannot be fulfilled
by docker-selenium, the test gets redirected to a
cloud testing provider (i.e. Sauce Labs)
Zalenium + Sauce Labs
35
How to Build Zealenium with Saucelabs?
 Zalenium works conceptually in a simple way
a * Zalenium
export SAUCE_USERNAME=<your Sauce Labs username>
export SAUCE_ACCESS_KEY=<your Sauce Labs access key>
export SAUCE_LABS_URL=<your Sauce Labs url:port number>
36
How to Build Zealenium with Saucelabs?
 Zalenium works conceptually in a simple way
a * Zalenium
docker run --rm -ti --name zalenium -p 4444:4444 
-e SAUCE_USERNAME -e SAUCE_ACCESS_KEY -e SAUCE_LABS_URL
-v /tmp/videos:/home/seluser/videos 
-v /var/run/docker.sock:/var/run/docker.sock 
--privileged dosel/zalenium start --sauceLabsEnabled true
37
How to Build Zealenium with Saucelabs?
 Zalenium works conceptually in a simple way
38
Create Remote Driver for Chrome
 Zalenium works conceptually in a simple way
 Zalenium works conceptually in a simple way
Run Selenium Tests on Chrome
41
Create Remote Driver for Chrome / Windows Zalenium works conceptually in a simple way
 Zalenium works conceptually in a simple way
Run Selenium Tests on Chrome / Windows
44
Tools and Services

Selenium Web Driver Zalenium/Selenium Grid Sauce Labs Docker
https://github.com/sargissargsyan/selenium-parallel-run
45
Thank You!
Ñ
sargis.sargsyan@live.com
t
@sargisset
ą
/in/sargissargsyan

More Related Content

What's hot

Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using Cucumber
KMS Technology
 
How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy
Impetus Technologies
 

What's hot (20)

Create an architecture for web test automation
Create an architecture for web test automationCreate an architecture for web test automation
Create an architecture for web test automation
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using Cucumber
 
Software Testing Tutorial For Beginners | Manual & Automation Testing | Selen...
Software Testing Tutorial For Beginners | Manual & Automation Testing | Selen...Software Testing Tutorial For Beginners | Manual & Automation Testing | Selen...
Software Testing Tutorial For Beginners | Manual & Automation Testing | Selen...
 
CI/CD Tools Universe: The Ultimate List
CI/CD Tools Universe: The Ultimate ListCI/CD Tools Universe: The Ultimate List
CI/CD Tools Universe: The Ultimate List
 
Test Automation and Selenium
Test Automation and SeleniumTest Automation and Selenium
Test Automation and Selenium
 
Automation With A Tool Demo
Automation With A Tool DemoAutomation With A Tool Demo
Automation With A Tool Demo
 
Selenium Grid
Selenium GridSelenium Grid
Selenium Grid
 
BDD with Cucumber
BDD with CucumberBDD with Cucumber
BDD with Cucumber
 
Cross browser testing using BrowserStack
Cross browser testing using BrowserStack Cross browser testing using BrowserStack
Cross browser testing using BrowserStack
 
Build Automation using Maven
Build Automation using Maven Build Automation using Maven
Build Automation using Maven
 
Automated Web Testing Using Selenium
Automated Web Testing Using SeleniumAutomated Web Testing Using Selenium
Automated Web Testing Using Selenium
 
Introduction to Selenium Automation
Introduction to Selenium AutomationIntroduction to Selenium Automation
Introduction to Selenium Automation
 
Web Test Automation with Selenium
Web Test Automation with SeleniumWeb Test Automation with Selenium
Web Test Automation with Selenium
 
Test Automation Framework with BDD and Cucumber
Test Automation Framework with BDD and CucumberTest Automation Framework with BDD and Cucumber
Test Automation Framework with BDD and Cucumber
 
Testing in Agile Projects
Testing in Agile ProjectsTesting in Agile Projects
Testing in Agile Projects
 
API Testing Using REST Assured with TestNG
API Testing Using REST Assured with TestNGAPI Testing Using REST Assured with TestNG
API Testing Using REST Assured with TestNG
 
[Infographic] Challenges in Test Automation
[Infographic] Challenges in Test Automation [Infographic] Challenges in Test Automation
[Infographic] Challenges in Test Automation
 
Developing a test automation strategy by Brian Bayer
Developing a test automation strategy by Brian BayerDeveloping a test automation strategy by Brian Bayer
Developing a test automation strategy by Brian Bayer
 
How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy
 
6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation Architecture6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation Architecture
 

Similar to Easy Setup for Parallel Test Execution with Selenium Docker

Selenium (1)
Selenium (1)Selenium (1)
Selenium (1)
onlinemindq
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
Nikhil Kapoor
 

Similar to Easy Setup for Parallel Test Execution with Selenium Docker (20)

Getting Started with Dockerization of Selenium Tests Execution - Testwarez 2019
Getting Started with Dockerization of Selenium Tests Execution - Testwarez 2019Getting Started with Dockerization of Selenium Tests Execution - Testwarez 2019
Getting Started with Dockerization of Selenium Tests Execution - Testwarez 2019
 
How to Dockerize Parallel Execution of Selenium Tests - SQA Days EU, Rgia, La...
How to Dockerize Parallel Execution of Selenium Tests - SQA Days EU, Rgia, La...How to Dockerize Parallel Execution of Selenium Tests - SQA Days EU, Rgia, La...
How to Dockerize Parallel Execution of Selenium Tests - SQA Days EU, Rgia, La...
 
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
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
 
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
 
Selenium Introduction and IDE
Selenium Introduction and IDESelenium Introduction and IDE
Selenium Introduction and IDE
 
Sel
SelSel
Sel
 
Selenium training for beginners
Selenium training for beginnersSelenium training for beginners
Selenium training for beginners
 
Scalable QA With Docker
Scalable QA With DockerScalable QA With Docker
Scalable QA With Docker
 
TestWorks Conf Scalable QA with docker - Maarten van den Ende and Adé Mochtar
TestWorks Conf Scalable QA with docker - Maarten van den Ende and Adé MochtarTestWorks Conf Scalable QA with docker - Maarten van den Ende and Adé Mochtar
TestWorks Conf Scalable QA with docker - Maarten van den Ende and Adé Mochtar
 
Introduction to Selenium grid
Introduction to Selenium gridIntroduction to Selenium grid
Introduction to Selenium grid
 
Selenium Introduction
Selenium IntroductionSelenium Introduction
Selenium Introduction
 
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
 
Testing world selenium_start_chapter1 (1)
Testing world selenium_start_chapter1 (1)Testing world selenium_start_chapter1 (1)
Testing world selenium_start_chapter1 (1)
 
Selenium (1)
Selenium (1)Selenium (1)
Selenium (1)
 
Selenium
SeleniumSelenium
Selenium
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
 
Selenium
SeleniumSelenium
Selenium
 

More from Sargis Sargsyan

More from Sargis Sargsyan (12)

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
 
Run your Appium tests using Docker Android - AppiumConf 2019
Run your Appium tests using Docker Android - AppiumConf 2019Run your Appium tests using Docker Android - AppiumConf 2019
Run your Appium tests using Docker Android - AppiumConf 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

No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
Sheetaleventcompany
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
amilabibi1
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
raffaeleoman
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
Kayode Fayemi
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
Kayode Fayemi
 

Recently uploaded (20)

Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar Training
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
 
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
 
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
 
lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.
 
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
 
ICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdfICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdf
 
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
 
Sector 62, Noida Call girls :8448380779 Noida Escorts | 100% verified
Sector 62, Noida Call girls :8448380779 Noida Escorts | 100% verifiedSector 62, Noida Call girls :8448380779 Noida Escorts | 100% verified
Sector 62, Noida Call girls :8448380779 Noida Escorts | 100% verified
 
Dreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIIDreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio III
 
My Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle BaileyMy Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle Bailey
 
Air breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animalsAir breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animals
 
Dreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video TreatmentDreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video Treatment
 
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfAWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
 

Easy Setup for Parallel Test Execution with Selenium Docker

  • 1. Easy Setup for Parallel Test Execution with Selenium Docker Sargis Sargsyan 
  • 3. 3 Introduction to Presentation 1 Why? 2 What is Selenium Grid 3 What is Docker Selenium 4 Configure Selenium Grid in Docker Containers 5 Running Selenium Suite in Parallel 6 Creating and maintaining docker-compose file 7 View test execution using debug nodes via VNC 9 Q&A8 Zalenium + Sauce Labs
  • 4.  Why we should run our test in Parallel? Why?
  • 5. 5 Why? Why we should run tests in Parallel Running Selenium tests is slow. Parallel testing is allowing us to speed up the test runtime. Also it allows us to increase coverage and run tests in different browser on the same time. Parallel Test Running Possibility to test more than one set of configurations Save Time! Reduce the time of test suite run Cost per Test to run More browser/OS coverage Fast feedback Less Manual Testing
  • 6. 6 Disadvantages  What are the disadvantages of Selenium Grid The performance of Selenium grid is low, in case if you are running large amount of the test and need large amount of nodes Setting up parallel running test suite requires time In case of large amount of tests it will be necessary to divide the suite into parts and run them in different machines If the suite was divided to pars there will be some difficulties in analyzing statistics, as there will be divided reports As the code is executed on the same machine the test were launched and the machine only receives the browser control commands. It is creating issues with uploading or downloading files
  • 7.  What is Selenium Grid
  • 8. 8 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
  • 9. 9 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
  • 10. 10 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
  • 11.  A flexible and scalable Selenium Grid Zalenium
  • 12. 12 Zalenium A grid that scales using docker-selenium Ƽ Hard to maintain a Selenium Grid Ƽ Allow anyone to have a disposable and flexible Selenium Grid infrastructure Why Zalenium?What is Zalenium? Dinamic, on-demand Selenium Grid Based on docker-selenium Simple to setup and run a * Zalenium
  • 13. 13 Zalenium Additional Features  Get a grid up and running in a few seconds! Test status and steps directly in the video Basic auth grid protection when deploying Zalenium in the cloud (AWS, GCP, …) Mount volumes across containers when you need to specific files in your tests a * Zalenium
  • 14. 14 How It Works?  Zalenium works conceptually in a simple way a * Zalenium
  • 15. 15 How It Works?  Zalenium works conceptually in a simple way a * Zalenium
  • 16. 16 How to Build Zealenium?  Zalenium works conceptually in a simple way a * Zalenium docker pull elgalu/selenium docker pull dosel/zalenium
  • 17. 17 How to Build Zealenium?  Zalenium works conceptually in a simple way a * Zalenium docker run --rm -ti --name zalenium -p 4444:4444 -e DOCKER=17.06.2-ce -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/videos:/home/seluser/videos --privileged dosel/zalenium start
  • 18.  Zalenium works conceptually in a simple way How to Build Zalenium?
  • 19.
  • 20. 20 How to Build Zealenium with docker-compose?  Zalenium works conceptually in a simple way a * Zalenium # Usage: # docker-compose up --force-recreate version: '2.1' services: zalenium: image: "dosel/zalenium" container_name: zalenium hostname: zalenium tty: true volumes: - /tmp/videos:/home/seluser/videos - /var/run/docker.sock:/var/run/docker.sock - /usr/bin/docker:/usr/bin/docker ports: - 4444:4444 command: > …………………………. ………………………….
  • 21.
  • 22.  Zalenium works conceptually in a simple way How to Run Test?
  • 23. 23 How to Build Zalenium?  Zalenium works conceptually in a simple way
  • 24.
  • 25.  Zalenium works conceptually in a simple way View browser via VNC in Zalenium?
  • 26.
  • 27.  Cloud-hosted web and mobile application automation platform Sauce Labs
  • 28. 28 Sauce Labs  A flexible and scalable Selenium Grid As the co-developers of Selenium, our team maintains the most up-to-date and reliable platform for web testing. Test securely knowing that our experts can help your organization build their test automation strategy. What is Sauce Labs Ƽ Run Selenium tests in real browsers in cloud Write test in most popular languages Specify platform configuration Spent less time to setting up and maintaining your testing infrastructure a * Sauce Labs
  • 29. 29 Sauce Labs  A flexible and scalable Selenium Grid a * Sauce Labs
  • 30. 30 How to Run Tests Against Sauce Labs?  Cloud-hosted web and mobile application automation platform
  • 31.  Cloud-hosted web and mobile application automation platform How to Run Tests Against Sauce Labs?
  • 32.
  • 33.  Redirect the test to a cloud testing provider Zalenium + Sauce Labs
  • 34. 34 Zalenium + Sauce Labs  Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam. If you need a capability that cannot be fulfilled by docker-selenium, the test gets redirected to a cloud testing provider (i.e. Sauce Labs) Zalenium + Sauce Labs
  • 35. 35 How to Build Zealenium with Saucelabs?  Zalenium works conceptually in a simple way a * Zalenium export SAUCE_USERNAME=<your Sauce Labs username> export SAUCE_ACCESS_KEY=<your Sauce Labs access key> export SAUCE_LABS_URL=<your Sauce Labs url:port number>
  • 36. 36 How to Build Zealenium with Saucelabs?  Zalenium works conceptually in a simple way a * Zalenium docker run --rm -ti --name zalenium -p 4444:4444 -e SAUCE_USERNAME -e SAUCE_ACCESS_KEY -e SAUCE_LABS_URL -v /tmp/videos:/home/seluser/videos -v /var/run/docker.sock:/var/run/docker.sock --privileged dosel/zalenium start --sauceLabsEnabled true
  • 37. 37 How to Build Zealenium with Saucelabs?  Zalenium works conceptually in a simple way
  • 38. 38 Create Remote Driver for Chrome  Zalenium works conceptually in a simple way
  • 39.  Zalenium works conceptually in a simple way Run Selenium Tests on Chrome
  • 40.
  • 41. 41 Create Remote Driver for Chrome / Windows Zalenium works conceptually in a simple way
  • 42.  Zalenium works conceptually in a simple way Run Selenium Tests on Chrome / Windows
  • 43.
  • 44. 44 Tools and Services  Selenium Web Driver Zalenium/Selenium Grid Sauce Labs Docker https://github.com/sargissargsyan/selenium-parallel-run