Advanced Selenium Testing
Techniques
A Perfecto Webinar
HOUSEKEEPING
• Please participate in our live poll and end-of-
webinar survey
• Ask us questions in the Q&A panel
• We will send you the recording and slides
11/10/2017 2© 2015, Perfecto Mobile Ltd. All Rights Reserved.
AGENDA
• The state of cross-browser testing
• What web test automation framework to
choose?
• Orchestrating Selenium tests
• Employing fast feedback through smart
reporting
• Q & A
Eran Kinsbruner
Dir., Lead
Evangelist Author
Uzi Eilon
CTO, Perfecto
Poll
How many test automation executions are your
teams running within a regression cycle?
• None
• 1 - 200
• 201 - 500
• 501 or More
• I don’t know
11/10/2017 4© 2015, Perfecto Mobile Ltd. All Rights Reserved.
CROSS-BROWSER TESTING = DESKTOP WEB
TESTING
THERE IS NO WEB TESTING VS. MOBILE TESTING
• 4 out of 10 transactions today
take place across multiple devices
• 48% of users today complain that the
websites they use are not optimized
for their smartphones and tablets
The State of Cross-Browser Testing
5/24/2018 6© 2018, Perfecto Mobile Ltd. All Rights Reserved.
Progressive Web (PWA)Revived Selenium IDE (Chrome/FF) Codeless Selenium
Responsive Web Design (RWD/PWA) – Tool Stack
Local build Hourly build
component team
Hourly Build - @Smoke
tests
Nightly – @Regression
tests
Pre-prod tests
Test type Unit Basic end-2-end
One basic flow
Basic functional testing
Regression tests
Full end-to-end testing Coverage and
performance
Target Verify the latest code does
not break the component
Verify the code is
ready to merge
with the other
teams’ code
Verify the app is ready to
be tested together with the
other component /
services on staging
Verify the new functionally
did not break existing
features
Verify existing and
new functionality.
Works on “production
like environment”
Trigger
Developers
Manual on machine
Build
Jenkins
always green
Jenkins
always green
Jenkins Jenkins
Estimated
execution time
Minutes Minutes Up to an hour A few hours A few hours
Resources Headless Browsers, Local
Browsers (built-in)
2- real devices Selenium grid (cloud)
Mobile Emulators
4 real devices
Selenium grid (cloud)
10 Browsers
12 real devices
Selenium grid (cloud)
20 Browsers
24 real devices
Pipeline Test Execution Management
Test AUTOMATION – What to Automate?
1. What’s the test engineer’s gut feeling 😊
2. Risk calculated as probability to occur and
impact to customers
3. Value – does the test provide new
information and, if failed, how much time to
fix?
4. Cost efficiency to develop – how long does
it take to develop and how easy is it to
script?
5. History of test – volume of historical
failures in related areas and frequency of
breaks
Source: Angie Jones
Selecting the Web Testing Framework
5/24/2018 10© 2018, Perfecto Mobile Ltd. All Rights Reserved.
Framework Driver
Management
Languages Execution
Environment
Skillset Reporting Element
Identification
Parallel
Testing
Logical
vs.
Physical
Test
Built-In/Cloud Ruby Local &
Cloud
BDD Basic Web Elements Thread
Based
Test per
driver
Built-In/Cloud JavaScript Local &
Cloud
BDD/Java Basic Angular Objects Multi-
Capability
Multi
Cloud Java Local &
Cloud
BDD/Java Enhanced* XPATH Based Elastic
Testing
Multi
BDD Based Framework
Ruby Test Authoring
Multi
• Browser
• Environments
(Local/Cloud)
Watir Framework Demonstration
Suitable for Angular
web sites
JavaScript
Test
Authoring
Multi:
• Browsers
• Environments
(Local/Cloud)
• Specs
External
Reporting
Protractor Framework Demonstration
Cross-Platform Test Execution - Quantum
Java Based
Framework
Support for Web
Browsers, Mobile
Apps
Environment - Cloud
Page Object
Model
Built-In
Reporting
Test Orchestration with Jenkins
Test Authoring – Treat Test Code as
Production Code
Test automation code is code – maintaining, versioning,
reviewing and leveraging best practices are key for
stable automation, stable CI, and stable pipeline.
Some Examples:
• Pairing / Coaching
• Use the right object identification strategy
• Use the right test framework to work with
• Measure test efficiency within the CI
• Risk-based approach to test automation
• Continuous test data analysis and improvement
https://bit.ly/2BK0uqn
Free Giveaway for Webinar
Attendees
Q & A
Thank you

Advanced Selenium Testing Techniques

  • 1.
  • 2.
    HOUSEKEEPING • Please participatein our live poll and end-of- webinar survey • Ask us questions in the Q&A panel • We will send you the recording and slides 11/10/2017 2© 2015, Perfecto Mobile Ltd. All Rights Reserved.
  • 3.
    AGENDA • The stateof cross-browser testing • What web test automation framework to choose? • Orchestrating Selenium tests • Employing fast feedback through smart reporting • Q & A Eran Kinsbruner Dir., Lead Evangelist Author Uzi Eilon CTO, Perfecto
  • 4.
    Poll How many testautomation executions are your teams running within a regression cycle? • None • 1 - 200 • 201 - 500 • 501 or More • I don’t know 11/10/2017 4© 2015, Perfecto Mobile Ltd. All Rights Reserved.
  • 5.
    CROSS-BROWSER TESTING =DESKTOP WEB TESTING THERE IS NO WEB TESTING VS. MOBILE TESTING • 4 out of 10 transactions today take place across multiple devices • 48% of users today complain that the websites they use are not optimized for their smartphones and tablets
  • 6.
    The State ofCross-Browser Testing 5/24/2018 6© 2018, Perfecto Mobile Ltd. All Rights Reserved. Progressive Web (PWA)Revived Selenium IDE (Chrome/FF) Codeless Selenium
  • 7.
    Responsive Web Design(RWD/PWA) – Tool Stack
  • 8.
    Local build Hourlybuild component team Hourly Build - @Smoke tests Nightly – @Regression tests Pre-prod tests Test type Unit Basic end-2-end One basic flow Basic functional testing Regression tests Full end-to-end testing Coverage and performance Target Verify the latest code does not break the component Verify the code is ready to merge with the other teams’ code Verify the app is ready to be tested together with the other component / services on staging Verify the new functionally did not break existing features Verify existing and new functionality. Works on “production like environment” Trigger Developers Manual on machine Build Jenkins always green Jenkins always green Jenkins Jenkins Estimated execution time Minutes Minutes Up to an hour A few hours A few hours Resources Headless Browsers, Local Browsers (built-in) 2- real devices Selenium grid (cloud) Mobile Emulators 4 real devices Selenium grid (cloud) 10 Browsers 12 real devices Selenium grid (cloud) 20 Browsers 24 real devices Pipeline Test Execution Management
  • 9.
    Test AUTOMATION –What to Automate? 1. What’s the test engineer’s gut feeling 😊 2. Risk calculated as probability to occur and impact to customers 3. Value – does the test provide new information and, if failed, how much time to fix? 4. Cost efficiency to develop – how long does it take to develop and how easy is it to script? 5. History of test – volume of historical failures in related areas and frequency of breaks Source: Angie Jones
  • 10.
    Selecting the WebTesting Framework 5/24/2018 10© 2018, Perfecto Mobile Ltd. All Rights Reserved. Framework Driver Management Languages Execution Environment Skillset Reporting Element Identification Parallel Testing Logical vs. Physical Test Built-In/Cloud Ruby Local & Cloud BDD Basic Web Elements Thread Based Test per driver Built-In/Cloud JavaScript Local & Cloud BDD/Java Basic Angular Objects Multi- Capability Multi Cloud Java Local & Cloud BDD/Java Enhanced* XPATH Based Elastic Testing Multi
  • 11.
    BDD Based Framework RubyTest Authoring Multi • Browser • Environments (Local/Cloud) Watir Framework Demonstration
  • 12.
    Suitable for Angular websites JavaScript Test Authoring Multi: • Browsers • Environments (Local/Cloud) • Specs External Reporting Protractor Framework Demonstration
  • 13.
    Cross-Platform Test Execution- Quantum Java Based Framework Support for Web Browsers, Mobile Apps Environment - Cloud Page Object Model Built-In Reporting
  • 14.
  • 15.
    Test Authoring –Treat Test Code as Production Code Test automation code is code – maintaining, versioning, reviewing and leveraging best practices are key for stable automation, stable CI, and stable pipeline. Some Examples: • Pairing / Coaching • Use the right object identification strategy • Use the right test framework to work with • Measure test efficiency within the CI • Risk-based approach to test automation • Continuous test data analysis and improvement
  • 16.
  • 17.
  • 18.