SlideShare a Scribd company logo
1 of 24
Download to read offline
1
Subline
HEADLINE
• whoami?
• How we use Selenium
• Selenium as a Service (Saucelabs / BrowserStack / …)
• Building your own Selenium GRID on AWS EC2
Selenium Meetup
What are we gonna talk about?
WHOAMI
Harry Urban
2
Harald.Urban@WeltN24.de
QA Lead@HarrysIdeAS
3
ABOUT MY COMPANY
WeltN24 GmbH - Axel Springer SE
APPSMOBILE
PRINT ONLINE
SOCIAL

MEDIA TV
USE CASES
Selenium GRID
4
www.welt.de m.welt.de
DesktopPage
MobileResponsive
SingleSignOn
PaymentWorkflows
CUCUMBER
BDD with Gerkhin
5
6
CUCUMBER
Step Implementation
CUCUMBER
Page Objects (e.g. with Fluentlenium)
7
FROM LOCALHOST TO CLOUD
First steps - Localhost
8
• „chief cook and bottle washer“ server (eierlegende Wollmilchsau Server)
• Jenkins for Test Execution
• Tomcat (webapp) for collecting and presenting test results
• Firefox instances as many as Jenkins Executors
• Selenium Standalone
• -> Left-over Firefox Instances
• -> Full Hard Drives
• -> Other Services not being able to run
• -> Resource Conflicts
• Either everything works or nothing
9
HEADLINE
Subline
FROM LOCALHOST TO CLOUD
First steps - Saucelabs
• Account at Saucelabs
• - Firewall Exclusions for Tests on Staging Systems
• wide ip range
• with changes every couple of months
• - Sometimes long response times -> failing tests
• + Throw-away Servers == no Re-Usage of VMs
• + Video Recordings of Sessions
• + No Stuck Browsers
• >1000$ / month
HEADLINE
Subline
10
FROM LOCALHOST TO CLOUD
First steps - BrowserStack
• Evaluation of BrowserStack
• - Hosting on AWS
• -> Wide AWS IP Range had to be whitelisted in Firewall for Stages
• -> Security / Privacy Issue
• - Re-Usage of VMs
• - A lot of False Positives
• - NO Video Recordings of Sessions
• - In the end more expensive than Saucelabs
11
FROM LOCALHOST TO CLOUD
Make or buy
-> Best satisfaction with
Saucelabs
HEADLINE
Subline
12
FROM LOCALHOST TO CLOUD
Chef Cookbooks for Infrastructure
vagrant-aws 

+ chef
+ selenium cookbook

= GRID @ AWS
HEADLINE
13
AWS Architecture
FROM LOCALHOST TO CLOUD
14
HEADLINE
Subline
HEADLINE
Subline
FROM LOCALHOST TO CLOUD
Setting up AWS Infrastructure
HEADLINE
EC2 Instance Overview
15
FROM LOCALHOST TO CLOUD
16
HEADLINE
SublineAuto Scaling Group for Selenium Nodes
FROM LOCALHOST TO CLOUD
HEADLINE
Subline
17
Auto Scaling Group for Selenium Nodes
FROM LOCALHOST TO CLOUD
HEADLINE
Subline
18
CloudWatch - Custom Metrics
FROM LOCALHOST TO CLOUD
Upscaling
• Pushing Pending Requests with cron job from HUB
-> increases ‚Desired‘ Size at AutoScalingGroup
Downscaling
• AWS EC2 pay at least 1h
• Nodes check from 50 to 60min if they are idle
if idle ->
a) detach from Grid

b) self destroy
c) decrease Desired Size at ASGroup
• if they are not idle in that timespan they got to live for another 50-60min
HEADLINE
Selenium Grid Console
19
FROM LOCALHOST TO CLOUD
20
LIMITATIONS OF AWS
Auto Scaling + AMIs
• Analytics showed that >50% of our users are on Windows
• -> right now 100% Windows Nodes
• unix nodes planed for DesiredCapability Platform=ANY
• Unix nodes are even easier, because they can be completely provisioned
• Challenges of Windows Nodes

-> No easy provisioning with Chef
• so far manually configured Windows AMI, that evolved over time
• (not yet time invested in provisioning naked Windows, 

e.g. Windows Templates for Packer)
• AutoScalingGroups work with AMIs
• ASGroups are based on LaunchConfigurations
• in LC’s you have to configure an AMI to launch
• -> no downside of Windows Nodes for our setup
21
LEARNINGS
Limitations of Webdriver and Selenium
• Keep requests to the DOM at a minimum
• e.g.: Don’t iterate through an XML file with WD requests
• No matter what, always stop the Browser at the end of your test
• Clean temporary files often
• Have a TimeOut in your code for interrupting page loads being stuck
FUTURE CHALLENGES
Testing Microservices
22
• WELTN24 is going to make a big switch from a monolith to micro services:
• Advantage: Teams can deploy independently and more often
• Requirement: Fully automated deployment
• Limitations of GUI-Tests (End2End Tests):
• The higher you get in the testing pyramid the more flaky your tests get
• -> Flaky tests don’t suit a fully automated deployment pipeline!?
• Challenge: Can GUI Tests tests be integrated in automated deployments?
• Proposal: Stable and smart Test Journeys through GUI for business critical paths
• combined with Contract Based Testing for ensuring functional behavior?
REFERENCES
LINKS AND TOOLS
23
• https://github.com/dhoer/chef-selenium/
• https://github.com/mitchellh/vagrant-aws
• https://github.com/agileorbit-cookbooks/java
• https://github.com/FluentLenium/FluentLenium/
• https://github.com/cucumber/cucumber-jvm/
• http://aws.amazon.com/de/ec2/
Worth a look at: https://github.com/groupon/Selenium-Grid-Extras
24
THANK YOU
STAY IN TOUCH
• Slides will be on:
• http://de.slideshare.net/urbanharry
• STAY IN TOUCH
• @HarrysIdeAS

• „Harry Urban“ ->
• LinkedIn
• XING
Questions?

More Related Content

Recently uploaded

Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书rnrncn29
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxeditsforyah
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
NSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationNSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationMarko4394
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 

Recently uploaded (20)

Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptx
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
NSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationNSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentation
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 

Featured

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 

Featured (20)

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 

Selenium Meetup Kickof Fyber AWS EC2 AutoScaling Selenium GRID

  • 1. 1 Subline HEADLINE • whoami? • How we use Selenium • Selenium as a Service (Saucelabs / BrowserStack / …) • Building your own Selenium GRID on AWS EC2 Selenium Meetup What are we gonna talk about?
  • 3. 3 ABOUT MY COMPANY WeltN24 GmbH - Axel Springer SE APPSMOBILE PRINT ONLINE SOCIAL
 MEDIA TV
  • 4. USE CASES Selenium GRID 4 www.welt.de m.welt.de DesktopPage MobileResponsive SingleSignOn PaymentWorkflows
  • 7. CUCUMBER Page Objects (e.g. with Fluentlenium) 7
  • 8. FROM LOCALHOST TO CLOUD First steps - Localhost 8 • „chief cook and bottle washer“ server (eierlegende Wollmilchsau Server) • Jenkins for Test Execution • Tomcat (webapp) for collecting and presenting test results • Firefox instances as many as Jenkins Executors • Selenium Standalone • -> Left-over Firefox Instances • -> Full Hard Drives • -> Other Services not being able to run • -> Resource Conflicts • Either everything works or nothing
  • 9. 9 HEADLINE Subline FROM LOCALHOST TO CLOUD First steps - Saucelabs • Account at Saucelabs • - Firewall Exclusions for Tests on Staging Systems • wide ip range • with changes every couple of months • - Sometimes long response times -> failing tests • + Throw-away Servers == no Re-Usage of VMs • + Video Recordings of Sessions • + No Stuck Browsers • >1000$ / month
  • 10. HEADLINE Subline 10 FROM LOCALHOST TO CLOUD First steps - BrowserStack • Evaluation of BrowserStack • - Hosting on AWS • -> Wide AWS IP Range had to be whitelisted in Firewall for Stages • -> Security / Privacy Issue • - Re-Usage of VMs • - A lot of False Positives • - NO Video Recordings of Sessions • - In the end more expensive than Saucelabs
  • 11. 11 FROM LOCALHOST TO CLOUD Make or buy -> Best satisfaction with Saucelabs
  • 12. HEADLINE Subline 12 FROM LOCALHOST TO CLOUD Chef Cookbooks for Infrastructure vagrant-aws 
 + chef + selenium cookbook
 = GRID @ AWS
  • 14. 14 HEADLINE Subline HEADLINE Subline FROM LOCALHOST TO CLOUD Setting up AWS Infrastructure
  • 16. 16 HEADLINE SublineAuto Scaling Group for Selenium Nodes FROM LOCALHOST TO CLOUD
  • 17. HEADLINE Subline 17 Auto Scaling Group for Selenium Nodes FROM LOCALHOST TO CLOUD
  • 18. HEADLINE Subline 18 CloudWatch - Custom Metrics FROM LOCALHOST TO CLOUD Upscaling • Pushing Pending Requests with cron job from HUB -> increases ‚Desired‘ Size at AutoScalingGroup Downscaling • AWS EC2 pay at least 1h • Nodes check from 50 to 60min if they are idle if idle -> a) detach from Grid
 b) self destroy c) decrease Desired Size at ASGroup • if they are not idle in that timespan they got to live for another 50-60min
  • 20. 20 LIMITATIONS OF AWS Auto Scaling + AMIs • Analytics showed that >50% of our users are on Windows • -> right now 100% Windows Nodes • unix nodes planed for DesiredCapability Platform=ANY • Unix nodes are even easier, because they can be completely provisioned • Challenges of Windows Nodes
 -> No easy provisioning with Chef • so far manually configured Windows AMI, that evolved over time • (not yet time invested in provisioning naked Windows, 
 e.g. Windows Templates for Packer) • AutoScalingGroups work with AMIs • ASGroups are based on LaunchConfigurations • in LC’s you have to configure an AMI to launch • -> no downside of Windows Nodes for our setup
  • 21. 21 LEARNINGS Limitations of Webdriver and Selenium • Keep requests to the DOM at a minimum • e.g.: Don’t iterate through an XML file with WD requests • No matter what, always stop the Browser at the end of your test • Clean temporary files often • Have a TimeOut in your code for interrupting page loads being stuck
  • 22. FUTURE CHALLENGES Testing Microservices 22 • WELTN24 is going to make a big switch from a monolith to micro services: • Advantage: Teams can deploy independently and more often • Requirement: Fully automated deployment • Limitations of GUI-Tests (End2End Tests): • The higher you get in the testing pyramid the more flaky your tests get • -> Flaky tests don’t suit a fully automated deployment pipeline!? • Challenge: Can GUI Tests tests be integrated in automated deployments? • Proposal: Stable and smart Test Journeys through GUI for business critical paths • combined with Contract Based Testing for ensuring functional behavior?
  • 23. REFERENCES LINKS AND TOOLS 23 • https://github.com/dhoer/chef-selenium/ • https://github.com/mitchellh/vagrant-aws • https://github.com/agileorbit-cookbooks/java • https://github.com/FluentLenium/FluentLenium/ • https://github.com/cucumber/cucumber-jvm/ • http://aws.amazon.com/de/ec2/ Worth a look at: https://github.com/groupon/Selenium-Grid-Extras
  • 24. 24 THANK YOU STAY IN TOUCH • Slides will be on: • http://de.slideshare.net/urbanharry • STAY IN TOUCH • @HarrysIdeAS
 • „Harry Urban“ -> • LinkedIn • XING Questions?