SlideShare a Scribd company logo
RUN TESTS AT SCALE WITH
ON-DEMAND SELENIUM GRID
USING AWS FARGATE
Presenter:
Megha Mehta
Megha Mehta
Senior Automation Engineer
S&P Global Market Intelligence, Gurgaon
https://www.linkedin.com/in/m-mehta/
SPEAKER
mmehta.ten@gmail.com
@meghamehtatech
PROBLEM DESCRIPTION
• Slower feedback
• Hardware provisioning challenges
• Additional maintenance effort
• Challenges with cross-browser testing
• UI tests take long to run
• More expensive
• Longer waits for feedback
without parallelization
SLOWER FEEDBACK
HARDWARE PROVISIONING
CHALLENGES
• Performance of under-provisioned hardware suffers
under peak loads
• Avoid wastage due to over-provisioning by optimizing
capacity utilization
Application
stops
responding
Infrastructure
slow under load
Tests failed
• Frequent software upgrades and patches for system
efficiency
-Typical maintenance activities – browser upgrades, OS hotfixes,
security patches, system restart, disk cleanup etc.
• This takes focus away from testing
ADDITIONAL MAINTENANCE
EFFORT
CHALLENGES WITH CROSS-
BROWSER TESTING
CHROME 75 FIREFOX 60
FIREFOX 65
On different versions of same
browser
On different
browsers
SOLUTION
Auto-
provisioned
with minimal
maintenance
requirement
s
• Auto-
scalable in
response to
varying
load
• Reliable
and cost-
effective
Run tests in
hyper-parallel
mode for
faster
feedback
Dynamic and
quick to change
OUR SOLUTION
A dockerized Selenium Grid running on AWS
TAKEAWAYS
• Designing your own high-capacity Selenium Grid using
Docker and AWS
• A scalable yet disposable grid
• Faster feedback – reduce execution time from hours to
minutes
• Enable Continuous Integration
• Major cost savings compared to traditional on-prem
infrastructure
ARCHITECTURE DEEP DIVE
|WHY DOCKER CONTAINERS?
VMs
heavyweight
Take up lot of memory resources
Startup time in minutes
Containers
lighweight
Require lower memory
Startup time in seconds
SELENIUM GRID – HUB SETUP
• Hub should have High Bandwidth to support large
number of requests from test clients and nodes
• High CPU needed for 1000’s of tests but lower
memory is fine
• In our case, hub is single container of 16GB RAM, 4
vCPU
SELENIUM GRID – NODE SETUP
• Containers of 16 GB RAM, 4
vCPU
• Each container can run up to
20 browsers without any
performance hit
Docker Swarm AWS EKS
(Kubernetes)
AWS ECS/Fargate
Do we need to
provision instances in
advance?
Yes Yes No, automatically
done by AWS
Is it suitable for short
workloads?
Yes No, master node
always up
Yes
How cost-effective is
the solution? *
Charged for
provisioned EC2’s
Additional charges
for cluster
management
Charged only for
duration that
containers are
running
*Considering the container cluster only runs for a few hours
HOW TO MANAGE SO MANY
CONTAINERS?
Deciding
factors ↓
Orchestration
solutions 
CONTAINER ORCHESTRATION USING
FARGATE
• No need to provision, configure, or
scale clusters of machines to run
containers – unlike other orchestration
solutions
• Focus on designing and building
Selenium Grid instead of managing the
infrastructure that runs it
AWS Fargate
LOAD BALANCER
• Selenium Hub is behind an AWS LB
which listens to incoming requests
from clients and responses from
nodes on port 4444
• Domain Name System (DNS) name
received by the LB can be quite
complex and lengthy
- Use a friendly DNS name for load
balancer using AWS Route53
AWS Application
Load Balancer
AWS Route53
• ECR – AWS Elastic Container Registry to
store Docker images
• Official selenium-node images
modified to expose container IP to hub
for registration
CONTAINER_IP=$(curl -s http://169.254.170.2/v2/metadata
| jq -r '.Containers[1].Networks[0].IPv4Addresses[0]')
ECR – REPOSITORY FOR DOCKER
IMAGES
AWS ECR
VPC
Application Load
Balancer
Node containers - Chrome
Node containers -
Firefox
Autoscaling Group
Amazon ECR
Jenkins
Node
Jenkins
node
Jenkins
Node
AWS Fargate
Selenium Hub
Selenium Grid
• Monitor container metrics like CPU and memory utilization
during tests
• Scale out – add 2 node containers whenever CPU Utilization
> 80% for 2 min
• Scale down to ZERO if idle > 5 mins
AUTO-SCALING USING
CLOUDWATCH
VPC
Application
Load Balancer
Node containers - Chrome
Node containers -
Firefox
Autoscaling Group
AWS Fargate
Selenium Hub
Selenium Grid
Amazon ECR
Jenkins
Node
Jenkins
node
Jenkins
Node
CloudWatch
logs
Cloudwatch
Alarm [Triggered
on CPU
utilization >
80%]
CLOUDFORMATION – BRINGING IT
ALL TOGETHER
• Describe and provision all the
infrastructure resources using
CloudFormation template
• Version control/replicate/update
the templates like application code
AWS
CloudFormation
*Calculations shown for US East (N. Virginia) Region. Also, costs of other services like ECR, AWS ALB etc.
are not included.
COST BENEFITS
41 Fargate Containers (1 Hub +
40 Nodes, each of 4vCPU and
16GB configuration)
x
10 minutes to complete 800
tests
x
5 times a day
x
30 days in a month
= 1025 hours
~ $238.59 per month*
41 VMs
x
~ $80 per VM per month
~ $3280 per month
COST BENEFITS
$39360
$2856
Annual costs
Fargate containers On-prem VM
That’s a saving of ~93%!
SUMMARY
• Designing your own high-capacity Selenium Grid using
Docker and AWS
• A scalable yet disposable grid
• Faster feedback – reduce execution time from hours to
minutes
• Enable Continuous Integration
• Major cost savings compared to traditional on-prem
infrastructure
• Task networking in Fargate
https://aws.amazon.com/blogs/compute/task-networking-in-aws-fargate/
• Comparison between clusters
https://www.trinimbus.com/blog/fresh-reinvent-2017-aws-introduces-
elastic-container-service-kubernetes-eks-fargate
• FARGATE pricing calculator
http://fargate-pricing-calculator.site.s3-website-us-east-1.amazonaws.com/
REFERENCES
CLOUDFORMATION TEMPLATE
https://github.com/mmehta-
10/selenium-grid-fargate
THANK YOU!
Ad

More Related Content

What's hot (20)

Jenkins presentation
Jenkins presentationJenkins presentation
Jenkins presentation
Valentin Buryakov
 
Selenium Presentation at Engineering Colleges
Selenium Presentation at Engineering CollegesSelenium Presentation at Engineering Colleges
Selenium Presentation at Engineering Colleges
Vijay Rangaiah
 
Web application testing with Selenium
Web application testing with SeleniumWeb application testing with Selenium
Web application testing with Selenium
Kerry Buckley
 
CI-Jenkins.pptx
CI-Jenkins.pptxCI-Jenkins.pptx
CI-Jenkins.pptx
MEDOBEST1
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
Naga Dinesh
 
Jenkins tutorial for beginners
Jenkins tutorial for beginnersJenkins tutorial for beginners
Jenkins tutorial for beginners
BugRaptors
 
Jenkins tutorial
Jenkins tutorialJenkins tutorial
Jenkins tutorial
HarikaReddy115
 
Selenium
SeleniumSelenium
Selenium
Batch2016
 
Automation Testing by Selenium Web Driver
Automation Testing by Selenium Web DriverAutomation Testing by Selenium Web Driver
Automation Testing by Selenium Web Driver
Cuelogic Technologies Pvt. Ltd.
 
Selenium WebDriver with C#
Selenium WebDriver with C#Selenium WebDriver with C#
Selenium WebDriver with C#
srivinayak
 
Automation test framework with cucumber – BDD
Automation test framework with cucumber – BDDAutomation test framework with cucumber – BDD
Automation test framework with cucumber – BDD
123abcda
 
Cucumber With Selenium
Cucumber With SeleniumCucumber With Selenium
Cucumber With Selenium
Vishwanath KC
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
Aneesh Rangarajan
 
CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...
CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...
CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...
Edureka!
 
Getting started with Jenkins
Getting started with JenkinsGetting started with Jenkins
Getting started with Jenkins
Edureka!
 
Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with selenium
Tzirla Rozental
 
An overview of selenium webdriver
An overview of selenium webdriverAn overview of selenium webdriver
An overview of selenium webdriver
Anuraj S.L
 
Yale Jenkins Show and Tell
Yale Jenkins Show and TellYale Jenkins Show and Tell
Yale Jenkins Show and Tell
E. Camden Fisher
 
Continuous Integration, Build Pipelines and Continuous Deployment
Continuous Integration, Build Pipelines and Continuous DeploymentContinuous Integration, Build Pipelines and Continuous Deployment
Continuous Integration, Build Pipelines and Continuous Deployment
Christopher Read
 
Cypress test techniques cucumber bdd framework,tdd,api tests course
Cypress test techniques cucumber bdd framework,tdd,api tests courseCypress test techniques cucumber bdd framework,tdd,api tests course
Cypress test techniques cucumber bdd framework,tdd,api tests course
Narayanan Palani
 
Selenium Presentation at Engineering Colleges
Selenium Presentation at Engineering CollegesSelenium Presentation at Engineering Colleges
Selenium Presentation at Engineering Colleges
Vijay Rangaiah
 
Web application testing with Selenium
Web application testing with SeleniumWeb application testing with Selenium
Web application testing with Selenium
Kerry Buckley
 
CI-Jenkins.pptx
CI-Jenkins.pptxCI-Jenkins.pptx
CI-Jenkins.pptx
MEDOBEST1
 
Jenkins tutorial for beginners
Jenkins tutorial for beginnersJenkins tutorial for beginners
Jenkins tutorial for beginners
BugRaptors
 
Selenium WebDriver with C#
Selenium WebDriver with C#Selenium WebDriver with C#
Selenium WebDriver with C#
srivinayak
 
Automation test framework with cucumber – BDD
Automation test framework with cucumber – BDDAutomation test framework with cucumber – BDD
Automation test framework with cucumber – BDD
123abcda
 
Cucumber With Selenium
Cucumber With SeleniumCucumber With Selenium
Cucumber With Selenium
Vishwanath KC
 
CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...
CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...
CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...
Edureka!
 
Getting started with Jenkins
Getting started with JenkinsGetting started with Jenkins
Getting started with Jenkins
Edureka!
 
Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with selenium
Tzirla Rozental
 
An overview of selenium webdriver
An overview of selenium webdriverAn overview of selenium webdriver
An overview of selenium webdriver
Anuraj S.L
 
Yale Jenkins Show and Tell
Yale Jenkins Show and TellYale Jenkins Show and Tell
Yale Jenkins Show and Tell
E. Camden Fisher
 
Continuous Integration, Build Pipelines and Continuous Deployment
Continuous Integration, Build Pipelines and Continuous DeploymentContinuous Integration, Build Pipelines and Continuous Deployment
Continuous Integration, Build Pipelines and Continuous Deployment
Christopher Read
 
Cypress test techniques cucumber bdd framework,tdd,api tests course
Cypress test techniques cucumber bdd framework,tdd,api tests courseCypress test techniques cucumber bdd framework,tdd,api tests course
Cypress test techniques cucumber bdd framework,tdd,api tests course
Narayanan Palani
 

Similar to Run tests at scale with on-demand Selenium Grid using AWS Fargate (20)

Running Siebel on AWS - Oracle Open World 13
Running Siebel on AWS - Oracle Open World 13Running Siebel on AWS - Oracle Open World 13
Running Siebel on AWS - Oracle Open World 13
Milind Waikul
 
Google Cloud Platform Certification Cloud Architect Exam Prep Review Virtual ...
Google Cloud Platform Certification Cloud Architect Exam Prep Review Virtual ...Google Cloud Platform Certification Cloud Architect Exam Prep Review Virtual ...
Google Cloud Platform Certification Cloud Architect Exam Prep Review Virtual ...
Joseph Holbrook, Chief Learning Officer (CLO)
 
SQL Server in the AWS Cloud
SQL Server in the AWS CloudSQL Server in the AWS Cloud
SQL Server in the AWS Cloud
DBInsight Pty Ltd
 
INF7827 DRS Best Practices
INF7827 DRS Best PracticesINF7827 DRS Best Practices
INF7827 DRS Best Practices
Brian Graf
 
Nuts and bolts of running a popular site in the aws cloud
Nuts and bolts of running a popular site in the aws cloudNuts and bolts of running a popular site in the aws cloud
Nuts and bolts of running a popular site in the aws cloud
David Veksler
 
Atmosphere 2018: Yury Tsarev - TEST DRIVEN INFRASTRUCTURE FOR HIGHLY PERFORMI...
Atmosphere 2018: Yury Tsarev - TEST DRIVEN INFRASTRUCTURE FOR HIGHLY PERFORMI...Atmosphere 2018: Yury Tsarev - TEST DRIVEN INFRASTRUCTURE FOR HIGHLY PERFORMI...
Atmosphere 2018: Yury Tsarev - TEST DRIVEN INFRASTRUCTURE FOR HIGHLY PERFORMI...
PROIDEA
 
VMworld 2013: Maximize Database Performance in Your Software-Defined Data Center
VMworld 2013: Maximize Database Performance in Your Software-Defined Data CenterVMworld 2013: Maximize Database Performance in Your Software-Defined Data Center
VMworld 2013: Maximize Database Performance in Your Software-Defined Data Center
VMworld
 
Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS
Tom Laszewski
 
Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWSMigrating enterprise workloads to AWS
Migrating enterprise workloads to AWS
Tom Laszewski
 
AWS migration: getting to Data Center heaven with AWS and Chef
AWS migration: getting to Data Center heaven with AWS and ChefAWS migration: getting to Data Center heaven with AWS and Chef
AWS migration: getting to Data Center heaven with AWS and Chef
Juan Vicente Herrera Ruiz de Alejo
 
Virtualizing Tier One Applications - Varrow
Virtualizing Tier One Applications - VarrowVirtualizing Tier One Applications - Varrow
Virtualizing Tier One Applications - Varrow
Andrew Miller
 
AKS components
AKS componentsAKS components
AKS components
Parisa Moosavinezhad
 
CloudStackFinalProject
CloudStackFinalProjectCloudStackFinalProject
CloudStackFinalProject
Gustavo El Khoury
 
VMworld 2014: Advanced SQL Server on vSphere Techniques and Best Practices
VMworld 2014: Advanced SQL Server on vSphere Techniques and Best PracticesVMworld 2014: Advanced SQL Server on vSphere Techniques and Best Practices
VMworld 2014: Advanced SQL Server on vSphere Techniques and Best Practices
VMworld
 
Varrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentationVarrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentation
pittmantony
 
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
VMworld
 
Getting Started with PaaS
Getting Started with PaaSGetting Started with PaaS
Getting Started with PaaS
CloudBees
 
Getting Started with Platform-as-a-Service
Getting Started with Platform-as-a-ServiceGetting Started with Platform-as-a-Service
Getting Started with Platform-as-a-Service
CloudBees
 
VMworld 2013: How SRP Delivers More Than Power to Their Customers
VMworld 2013: How SRP Delivers More Than Power to Their Customers VMworld 2013: How SRP Delivers More Than Power to Their Customers
VMworld 2013: How SRP Delivers More Than Power to Their Customers
VMworld
 
Performance testing with 100,000 concurrent users in AWS
Performance testing with 100,000 concurrent users in AWSPerformance testing with 100,000 concurrent users in AWS
Performance testing with 100,000 concurrent users in AWS
Matthias Matook
 
Running Siebel on AWS - Oracle Open World 13
Running Siebel on AWS - Oracle Open World 13Running Siebel on AWS - Oracle Open World 13
Running Siebel on AWS - Oracle Open World 13
Milind Waikul
 
INF7827 DRS Best Practices
INF7827 DRS Best PracticesINF7827 DRS Best Practices
INF7827 DRS Best Practices
Brian Graf
 
Nuts and bolts of running a popular site in the aws cloud
Nuts and bolts of running a popular site in the aws cloudNuts and bolts of running a popular site in the aws cloud
Nuts and bolts of running a popular site in the aws cloud
David Veksler
 
Atmosphere 2018: Yury Tsarev - TEST DRIVEN INFRASTRUCTURE FOR HIGHLY PERFORMI...
Atmosphere 2018: Yury Tsarev - TEST DRIVEN INFRASTRUCTURE FOR HIGHLY PERFORMI...Atmosphere 2018: Yury Tsarev - TEST DRIVEN INFRASTRUCTURE FOR HIGHLY PERFORMI...
Atmosphere 2018: Yury Tsarev - TEST DRIVEN INFRASTRUCTURE FOR HIGHLY PERFORMI...
PROIDEA
 
VMworld 2013: Maximize Database Performance in Your Software-Defined Data Center
VMworld 2013: Maximize Database Performance in Your Software-Defined Data CenterVMworld 2013: Maximize Database Performance in Your Software-Defined Data Center
VMworld 2013: Maximize Database Performance in Your Software-Defined Data Center
VMworld
 
Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS
Tom Laszewski
 
Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWSMigrating enterprise workloads to AWS
Migrating enterprise workloads to AWS
Tom Laszewski
 
AWS migration: getting to Data Center heaven with AWS and Chef
AWS migration: getting to Data Center heaven with AWS and ChefAWS migration: getting to Data Center heaven with AWS and Chef
AWS migration: getting to Data Center heaven with AWS and Chef
Juan Vicente Herrera Ruiz de Alejo
 
Virtualizing Tier One Applications - Varrow
Virtualizing Tier One Applications - VarrowVirtualizing Tier One Applications - Varrow
Virtualizing Tier One Applications - Varrow
Andrew Miller
 
VMworld 2014: Advanced SQL Server on vSphere Techniques and Best Practices
VMworld 2014: Advanced SQL Server on vSphere Techniques and Best PracticesVMworld 2014: Advanced SQL Server on vSphere Techniques and Best Practices
VMworld 2014: Advanced SQL Server on vSphere Techniques and Best Practices
VMworld
 
Varrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentationVarrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentation
pittmantony
 
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
VMworld
 
Getting Started with PaaS
Getting Started with PaaSGetting Started with PaaS
Getting Started with PaaS
CloudBees
 
Getting Started with Platform-as-a-Service
Getting Started with Platform-as-a-ServiceGetting Started with Platform-as-a-Service
Getting Started with Platform-as-a-Service
CloudBees
 
VMworld 2013: How SRP Delivers More Than Power to Their Customers
VMworld 2013: How SRP Delivers More Than Power to Their Customers VMworld 2013: How SRP Delivers More Than Power to Their Customers
VMworld 2013: How SRP Delivers More Than Power to Their Customers
VMworld
 
Performance testing with 100,000 concurrent users in AWS
Performance testing with 100,000 concurrent users in AWSPerformance testing with 100,000 concurrent users in AWS
Performance testing with 100,000 concurrent users in AWS
Matthias Matook
 
Ad

Recently uploaded (20)

How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
The Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI IntegrationThe Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI Integration
Re-solution Data Ltd
 
Viam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdfViam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdf
camilalamoratta
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Build 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHSBuild 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHS
TECH EHS Solution
 
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdfAre Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Telecoms Supermarket
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
Web and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in RajpuraWeb and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in Rajpura
Erginous Technology
 
Vibe Coding_ Develop a web application using AI (1).pdf
Vibe Coding_ Develop a web application using AI (1).pdfVibe Coding_ Develop a web application using AI (1).pdf
Vibe Coding_ Develop a web application using AI (1).pdf
Baiju Muthukadan
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
Connect and Protect: Networks and Network Security
Connect and Protect: Networks and Network SecurityConnect and Protect: Networks and Network Security
Connect and Protect: Networks and Network Security
VICTOR MAESTRE RAMIREZ
 
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent LasterAI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
All Things Open
 
TrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token ListingTrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token Listing
Trs Labs
 
Play It Safe: Manage Security Risks - Google Certificate
Play It Safe: Manage Security Risks - Google CertificatePlay It Safe: Manage Security Risks - Google Certificate
Play It Safe: Manage Security Risks - Google Certificate
VICTOR MAESTRE RAMIREZ
 
UiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer OpportunitiesUiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer Opportunities
DianaGray10
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
The Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI IntegrationThe Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI Integration
Re-solution Data Ltd
 
Viam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdfViam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdf
camilalamoratta
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Build 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHSBuild 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHS
TECH EHS Solution
 
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdfAre Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Telecoms Supermarket
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
Web and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in RajpuraWeb and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in Rajpura
Erginous Technology
 
Vibe Coding_ Develop a web application using AI (1).pdf
Vibe Coding_ Develop a web application using AI (1).pdfVibe Coding_ Develop a web application using AI (1).pdf
Vibe Coding_ Develop a web application using AI (1).pdf
Baiju Muthukadan
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
Connect and Protect: Networks and Network Security
Connect and Protect: Networks and Network SecurityConnect and Protect: Networks and Network Security
Connect and Protect: Networks and Network Security
VICTOR MAESTRE RAMIREZ
 
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent LasterAI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
All Things Open
 
TrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token ListingTrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token Listing
Trs Labs
 
Play It Safe: Manage Security Risks - Google Certificate
Play It Safe: Manage Security Risks - Google CertificatePlay It Safe: Manage Security Risks - Google Certificate
Play It Safe: Manage Security Risks - Google Certificate
VICTOR MAESTRE RAMIREZ
 
UiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer OpportunitiesUiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer Opportunities
DianaGray10
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Ad

Run tests at scale with on-demand Selenium Grid using AWS Fargate

  • 1. RUN TESTS AT SCALE WITH ON-DEMAND SELENIUM GRID USING AWS FARGATE Presenter: Megha Mehta
  • 2. Megha Mehta Senior Automation Engineer S&P Global Market Intelligence, Gurgaon https://www.linkedin.com/in/m-mehta/ SPEAKER [email protected] @meghamehtatech
  • 3. PROBLEM DESCRIPTION • Slower feedback • Hardware provisioning challenges • Additional maintenance effort • Challenges with cross-browser testing
  • 4. • UI tests take long to run • More expensive • Longer waits for feedback without parallelization SLOWER FEEDBACK
  • 5. HARDWARE PROVISIONING CHALLENGES • Performance of under-provisioned hardware suffers under peak loads • Avoid wastage due to over-provisioning by optimizing capacity utilization Application stops responding Infrastructure slow under load Tests failed
  • 6. • Frequent software upgrades and patches for system efficiency -Typical maintenance activities – browser upgrades, OS hotfixes, security patches, system restart, disk cleanup etc. • This takes focus away from testing ADDITIONAL MAINTENANCE EFFORT
  • 7. CHALLENGES WITH CROSS- BROWSER TESTING CHROME 75 FIREFOX 60 FIREFOX 65 On different versions of same browser On different browsers
  • 8. SOLUTION Auto- provisioned with minimal maintenance requirement s • Auto- scalable in response to varying load • Reliable and cost- effective Run tests in hyper-parallel mode for faster feedback Dynamic and quick to change
  • 9. OUR SOLUTION A dockerized Selenium Grid running on AWS
  • 10. TAKEAWAYS • Designing your own high-capacity Selenium Grid using Docker and AWS • A scalable yet disposable grid • Faster feedback – reduce execution time from hours to minutes • Enable Continuous Integration • Major cost savings compared to traditional on-prem infrastructure
  • 12. |WHY DOCKER CONTAINERS? VMs heavyweight Take up lot of memory resources Startup time in minutes Containers lighweight Require lower memory Startup time in seconds
  • 13. SELENIUM GRID – HUB SETUP • Hub should have High Bandwidth to support large number of requests from test clients and nodes • High CPU needed for 1000’s of tests but lower memory is fine • In our case, hub is single container of 16GB RAM, 4 vCPU
  • 14. SELENIUM GRID – NODE SETUP • Containers of 16 GB RAM, 4 vCPU • Each container can run up to 20 browsers without any performance hit
  • 15. Docker Swarm AWS EKS (Kubernetes) AWS ECS/Fargate Do we need to provision instances in advance? Yes Yes No, automatically done by AWS Is it suitable for short workloads? Yes No, master node always up Yes How cost-effective is the solution? * Charged for provisioned EC2’s Additional charges for cluster management Charged only for duration that containers are running *Considering the container cluster only runs for a few hours HOW TO MANAGE SO MANY CONTAINERS? Deciding factors ↓ Orchestration solutions 
  • 16. CONTAINER ORCHESTRATION USING FARGATE • No need to provision, configure, or scale clusters of machines to run containers – unlike other orchestration solutions • Focus on designing and building Selenium Grid instead of managing the infrastructure that runs it AWS Fargate
  • 17. LOAD BALANCER • Selenium Hub is behind an AWS LB which listens to incoming requests from clients and responses from nodes on port 4444 • Domain Name System (DNS) name received by the LB can be quite complex and lengthy - Use a friendly DNS name for load balancer using AWS Route53 AWS Application Load Balancer AWS Route53
  • 18. • ECR – AWS Elastic Container Registry to store Docker images • Official selenium-node images modified to expose container IP to hub for registration CONTAINER_IP=$(curl -s http://169.254.170.2/v2/metadata | jq -r '.Containers[1].Networks[0].IPv4Addresses[0]') ECR – REPOSITORY FOR DOCKER IMAGES AWS ECR
  • 19. VPC Application Load Balancer Node containers - Chrome Node containers - Firefox Autoscaling Group Amazon ECR Jenkins Node Jenkins node Jenkins Node AWS Fargate Selenium Hub Selenium Grid
  • 20. • Monitor container metrics like CPU and memory utilization during tests • Scale out – add 2 node containers whenever CPU Utilization > 80% for 2 min • Scale down to ZERO if idle > 5 mins AUTO-SCALING USING CLOUDWATCH
  • 21. VPC Application Load Balancer Node containers - Chrome Node containers - Firefox Autoscaling Group AWS Fargate Selenium Hub Selenium Grid Amazon ECR Jenkins Node Jenkins node Jenkins Node CloudWatch logs Cloudwatch Alarm [Triggered on CPU utilization > 80%]
  • 22. CLOUDFORMATION – BRINGING IT ALL TOGETHER • Describe and provision all the infrastructure resources using CloudFormation template • Version control/replicate/update the templates like application code AWS CloudFormation
  • 23. *Calculations shown for US East (N. Virginia) Region. Also, costs of other services like ECR, AWS ALB etc. are not included. COST BENEFITS 41 Fargate Containers (1 Hub + 40 Nodes, each of 4vCPU and 16GB configuration) x 10 minutes to complete 800 tests x 5 times a day x 30 days in a month = 1025 hours ~ $238.59 per month* 41 VMs x ~ $80 per VM per month ~ $3280 per month
  • 24. COST BENEFITS $39360 $2856 Annual costs Fargate containers On-prem VM That’s a saving of ~93%!
  • 25. SUMMARY • Designing your own high-capacity Selenium Grid using Docker and AWS • A scalable yet disposable grid • Faster feedback – reduce execution time from hours to minutes • Enable Continuous Integration • Major cost savings compared to traditional on-prem infrastructure
  • 26. • Task networking in Fargate https://aws.amazon.com/blogs/compute/task-networking-in-aws-fargate/ • Comparison between clusters https://www.trinimbus.com/blog/fresh-reinvent-2017-aws-introduces- elastic-container-service-kubernetes-eks-fargate • FARGATE pricing calculator http://fargate-pricing-calculator.site.s3-website-us-east-1.amazonaws.com/ REFERENCES