SlideShare a Scribd company logo
1 of 47
Adam Carmi (@carmiadam)
Co-Founder and VP R&D at Applitools
ADVANCED AUTOMATED
VISUAL TESTING WITH
SELENIUM
YOU CAN AND SHOULD
AUTOMATE YOUR
VISUAL TESTS!
AGENDA
 Why automated visual testing?
 Tools & Technology
 Where does it fit?
 Q & A
WHAT IS VISUAL TESTING?
A quality assurance activity aimed to verify that a Graphical
User Interface appears correctly to users
WHY AUTOMATE?
The test matrix is too big to cover manually
 Web browsers
 Devices
 Operating systems
 Screen resolutions
 Responsive design
 L10n
 3rd Party upgrades
WHY AUTOMATE?
Mobile apps quality is critical
 Harder to roll back changes
 Can’t push daily
 Updates take battery and data
 Higher quality bar
WHY AUTOMATE?
Release cycles keep getting shorter
AGENDA
 Why automated visual testing?
 Tools & Technology
 Where does it fit?
 Q & A
HOW DOES IT WORK?
Drive the AUT and take screenshots
Compare screenshots with baseline images
Report differences
Update the baseline
DEMOWebDriverCSS
HOW DOES IT WORK?
Drive the AUT and take screenshots
Compare screenshots with baseline images
Report differences
Update the baseline
AND MORE…
 1 pixel offsets in element positioning
 Dynamic content
 Moving elements
 Images of different size
 Performance
IMAGE COMPARISON
ENGINES
ImageMagick
 A powerful command line tool for image processing.
 Fuzzing is used to eliminate slight color differences
 An error ratio is usually used to determine a match
$ compare –metric AE –fuzz 5% img1.png img2.png diff.png
2246
THE JAVASCRIPT ENGINES
 Resemble.js
Pixel by pixel + error ratio + anti-aliasing
http://huddle.github.io/Resemble.js
 Blink-Diff
Pixel by pixel + error ratio + anti-aliasing + perceptual color distance
computation
https://github.com/yahoo/blink-diff
 Looks-Same
Pixel by pixel + perceptual color distance computation + ignore Caret
https://github.com/gemini-testing/looks-same
APPLITOOLS EYES
 Handles anti-aliasing, pixel offsets, color similarity, and image scaling
 Dynamic and moving content
 Compare images of different sizes
 No error ratio configuration required
 Validates full UI pages
 Fast!
 Supports layout / structure matching
DEMOVISUAL LAYOUT MATCHING
HOW DOES IT WORK?
Drive the AUT and take screenshots
Compare screenshots with baseline images
Report differences
Update the baseline
QUICK FEEDBACK TOOLS
MOTIVATION
 Get fast feedback on code changes
 Run tests locally in the background
SETUP
 Render screenshots with a headless
browser
 PhatomJS, SlimerJS
 Configuration file driven tests
CONS
 Partial coverage
 Chrome, IE?
 Old browser layout engine versions
 Limited navigation
VISUAL COVERAGE TOOLS
MOTIVATION
 Verify that the app / site looks right in
all real execution environments
 Test as many UI states as possible
 Execute many tests in parallel
SETUP
 Render screenshots using real browsers
on a variety of operating systems and
devices in parallel
 WebDriver, Grid
 Code driven tests
 WebDriver, DSLCONS
 Requires test infrastructure
 Implement and maintain test code
SELENIUM BASED TOOLS
CODE / SCRIPT
● Needle (Python WD)
● WebDriverCss (JS WebDriverIO)
● Gemini (JS DSL)
● Selenium Visual Diff (Java WD)
● VisualCeption (PHP CodeCeption)
● Pix-Diff (JS Protractor)
● Shoov (JS WebDriverIO)
● Vizregress (.NET WD)
● Rspec Page Regression (Capibara)
● Applitools Eyes (All WD + Appium)
● Fighting Layout Bugs (Java WebDriver)
● Huxley (Record Playback)
CONFIGURATION
● Viff
● CSS Visual Test
● GreenOnion
● Wraith-Selenium
HOW DOES IT WORK?
Drive the AUT and take screenshots
Compare screenshots with baseline images
Report differences
Update the baseline
REPORT DIFFERENCES
As files on the file system
WebDriverCSS
REPORT DIFFERENCES
As a gallery
Selenium Visual Diff
HOW DOES IT WORK?
Drive the AUT and take screenshots
Compare screenshots with baseline images
Report differences
Update the baseline
UPDATE THE BASELINE
Gemini
DEMOAUTOMATED MAINTENANCE
AGENDA
 Why automated visual testing?
 Tools & Technology
 Where does it fit?
 Q & A
WHERE DOES IT FIT?
• Component
s
• Code
review
• Developers
• Designers
• QA
Visual testing of frontend components by
frontend developers
WHERE DOES IT FIT?
• Pages
• Page
sections
• Developers
• Designers
• QA
• Others
Full or partial validation of application screens
A collaboration tool
WHERE DOES IT FIT?
• Staging vs.
Production
• Ops
• QA
Validate your staging deployment using your
production deployment as a baseline
WHERE DOES IT FIT?
• Monitoring
• Ops
• QA
No missing resources in production
No corruption due to 3rd party data
No corruption due to browser / OS upgrades
Adam Carmi (@carmiadam)
Co-Founder and VP R&D at Applitools
QUESTIONS?

More Related Content

What's hot

Appium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriverAppium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriver
Andrii Dzynia
 
Testing Native iOS Apps with Appium
Testing Native iOS Apps with AppiumTesting Native iOS Apps with Appium
Testing Native iOS Apps with Appium
Sauce Labs
 

What's hot (20)

Appium
AppiumAppium
Appium
 
What's New With Appium? From 1.0 to Now
What's New With Appium? From 1.0 to NowWhat's New With Appium? From 1.0 to Now
What's New With Appium? From 1.0 to Now
 
Nakal think test_2015
Nakal think test_2015Nakal think test_2015
Nakal think test_2015
 
Appium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriverAppium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriver
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
 
Advanced Appium: SeleniumConf UK 2016
Advanced Appium: SeleniumConf UK 2016Advanced Appium: SeleniumConf UK 2016
Advanced Appium: SeleniumConf UK 2016
 
Selenium, Appium, and Robots!
Selenium, Appium, and Robots!Selenium, Appium, and Robots!
Selenium, Appium, and Robots!
 
Introduction To Appium With Robotframework
Introduction To Appium With RobotframeworkIntroduction To Appium With Robotframework
Introduction To Appium With Robotframework
 
SeConf_Nov2016_London
SeConf_Nov2016_LondonSeConf_Nov2016_London
SeConf_Nov2016_London
 
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
 
Wheat - Mobile functional test automation
Wheat - Mobile functional test automationWheat - Mobile functional test automation
Wheat - Mobile functional test automation
 
Appium overview
Appium overviewAppium overview
Appium overview
 
Appium
AppiumAppium
Appium
 
Improving Android app testing with Appium and Sauce Labs
Improving Android app testing with Appium and Sauce LabsImproving Android app testing with Appium and Sauce Labs
Improving Android app testing with Appium and Sauce Labs
 
Appium solution
Appium solutionAppium solution
Appium solution
 
The wild wild west of Selenium Capabilities
The wild wild west of Selenium CapabilitiesThe wild wild west of Selenium Capabilities
The wild wild west of Selenium Capabilities
 
Advanced Appium Tips & Tricks with Jonathan Lipps
Advanced Appium Tips & Tricks with Jonathan LippsAdvanced Appium Tips & Tricks with Jonathan Lipps
Advanced Appium Tips & Tricks with Jonathan Lipps
 
Testing on Mobile Devices with Location Services
Testing on Mobile Devices with Location ServicesTesting on Mobile Devices with Location Services
Testing on Mobile Devices with Location Services
 
Testing Native iOS Apps with Appium
Testing Native iOS Apps with AppiumTesting Native iOS Apps with Appium
Testing Native iOS Apps with Appium
 
Cross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToCross Platform Appium Tests: How To
Cross Platform Appium Tests: How To
 

Viewers also liked

Continuous Automated Testing - Cast conference workshop august 2014
Continuous Automated Testing - Cast conference workshop august 2014Continuous Automated Testing - Cast conference workshop august 2014
Continuous Automated Testing - Cast conference workshop august 2014
Noah Sussman
 

Viewers also liked (20)

Brace yourself from automation death trap
Brace yourself from automation death trapBrace yourself from automation death trap
Brace yourself from automation death trap
 
Testing desktop apps with selenium
Testing desktop apps with seleniumTesting desktop apps with selenium
Testing desktop apps with selenium
 
Selenium for Jobseekers
Selenium for JobseekersSelenium for Jobseekers
Selenium for Jobseekers
 
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
 
What you can do with WordPress Heartbeat API
What you can do with WordPress Heartbeat APIWhat you can do with WordPress Heartbeat API
What you can do with WordPress Heartbeat API
 
Page Objects Done Right - selenium conference 2014
Page Objects Done Right - selenium conference 2014Page Objects Done Right - selenium conference 2014
Page Objects Done Right - selenium conference 2014
 
Automated Unit Testing
Automated Unit TestingAutomated Unit Testing
Automated Unit Testing
 
Automated testing 101
Automated testing 101Automated testing 101
Automated testing 101
 
Automated Testing & Auto Scaling your Apps with Microsoft & Open Source Techn...
Automated Testing & Auto Scaling your Apps with Microsoft & Open Source Techn...Automated Testing & Auto Scaling your Apps with Microsoft & Open Source Techn...
Automated Testing & Auto Scaling your Apps with Microsoft & Open Source Techn...
 
Test Data - Food for your Test Automation Framework
Test Data - Food for your Test Automation FrameworkTest Data - Food for your Test Automation Framework
Test Data - Food for your Test Automation Framework
 
Testing as a container
Testing as a containerTesting as a container
Testing as a container
 
How to level-up your Selenium tests with Visual Testing #SeleniumCamp
How to level-up your Selenium tests with Visual Testing #SeleniumCampHow to level-up your Selenium tests with Visual Testing #SeleniumCamp
How to level-up your Selenium tests with Visual Testing #SeleniumCamp
 
Automated Testing Environment by Bugzilla, Testopia and Jenkins
Automated Testing Environment by Bugzilla, Testopia and JenkinsAutomated Testing Environment by Bugzilla, Testopia and Jenkins
Automated Testing Environment by Bugzilla, Testopia and Jenkins
 
SeConf2015: Advanced Automated Visual Testing With Selenium
SeConf2015: Advanced Automated Visual Testing With SeleniumSeConf2015: Advanced Automated Visual Testing With Selenium
SeConf2015: Advanced Automated Visual Testing With Selenium
 
Continuous Automated Testing - Cast conference workshop august 2014
Continuous Automated Testing - Cast conference workshop august 2014Continuous Automated Testing - Cast conference workshop august 2014
Continuous Automated Testing - Cast conference workshop august 2014
 
Automated Testing with Agile
Automated Testing with AgileAutomated Testing with Agile
Automated Testing with Agile
 
Automated Testing for Embedded Software in C or C++
Automated Testing for Embedded Software in C or C++Automated Testing for Embedded Software in C or C++
Automated Testing for Embedded Software in C or C++
 
Selenium RC: Automated Testing of Modern Web Applications
Selenium RC: Automated Testing of Modern Web ApplicationsSelenium RC: Automated Testing of Modern Web Applications
Selenium RC: Automated Testing of Modern Web Applications
 
Automated Regression Testing for Embedded Systems in Action
Automated Regression Testing for Embedded Systems in ActionAutomated Regression Testing for Embedded Systems in Action
Automated Regression Testing for Embedded Systems in Action
 
Agile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated TestingAgile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated Testing
 

Similar to Advanced automated visual testing with Selenium

Visual Testing: Quality and Speed -- by GIl Tayar, Applitools
Visual Testing: Quality and Speed -- by GIl Tayar, Applitools Visual Testing: Quality and Speed -- by GIl Tayar, Applitools
Visual Testing: Quality and Speed -- by GIl Tayar, Applitools
Applitools
 
Performance Measurement and Monitoring for Salesforce Web & Mobile Apps
Performance Measurement and Monitoring for Salesforce Web & Mobile AppsPerformance Measurement and Monitoring for Salesforce Web & Mobile Apps
Performance Measurement and Monitoring for Salesforce Web & Mobile Apps
Salesforce Developers
 
Building Mobile Optimized Websites
Building Mobile Optimized WebsitesBuilding Mobile Optimized Websites
Building Mobile Optimized Websites
haxorize
 

Similar to Advanced automated visual testing with Selenium (20)

Advanced Visual Test Automation with Selenium
Advanced Visual Test Automation with SeleniumAdvanced Visual Test Automation with Selenium
Advanced Visual Test Automation with Selenium
 
Automated Visual Testing That Doesn't Suck!
Automated Visual Testing That Doesn't Suck!Automated Visual Testing That Doesn't Suck!
Automated Visual Testing That Doesn't Suck!
 
Selenium-based Visual Test Automation
Selenium-based Visual Test AutomationSelenium-based Visual Test Automation
Selenium-based Visual Test Automation
 
Adam carmi
Adam carmiAdam carmi
Adam carmi
 
Introduction to automated visual testing
Introduction to automated visual testingIntroduction to automated visual testing
Introduction to automated visual testing
 
Colorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latestColorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latest
 
Advanced Visual Test Automation With Selenium
Advanced Visual Test Automation With SeleniumAdvanced Visual Test Automation With Selenium
Advanced Visual Test Automation With Selenium
 
Advanced Automated Visual Testing for Mobile Apps
Advanced Automated Visual Testing for Mobile AppsAdvanced Automated Visual Testing for Mobile Apps
Advanced Automated Visual Testing for Mobile Apps
 
Visual Testing: Quality and Speed -- by GIl Tayar, Applitools
Visual Testing: Quality and Speed -- by GIl Tayar, Applitools Visual Testing: Quality and Speed -- by GIl Tayar, Applitools
Visual Testing: Quality and Speed -- by GIl Tayar, Applitools
 
Performance Measurement and Monitoring for Salesforce Web & Mobile Apps
Performance Measurement and Monitoring for Salesforce Web & Mobile AppsPerformance Measurement and Monitoring for Salesforce Web & Mobile Apps
Performance Measurement and Monitoring for Salesforce Web & Mobile Apps
 
Visual Regression Testing
Visual Regression TestingVisual Regression Testing
Visual Regression Testing
 
Building Your Own Native App Visual Testing Module with Appium
Building Your Own Native App Visual Testing Module with AppiumBuilding Your Own Native App Visual Testing Module with Appium
Building Your Own Native App Visual Testing Module with Appium
 
Effective Data Visualization - Strata (Feb 2012)
Effective Data Visualization - Strata (Feb 2012)Effective Data Visualization - Strata (Feb 2012)
Effective Data Visualization - Strata (Feb 2012)
 
Building Your Own Native App Visual Testing Module with Appium by Wim Selles
Building Your Own Native App Visual Testing Module with Appium by Wim SellesBuilding Your Own Native App Visual Testing Module with Appium by Wim Selles
Building Your Own Native App Visual Testing Module with Appium by Wim Selles
 
Building Your Own Native App Visual Testing Module with Appium
Building Your Own Native App  Visual Testing Module with AppiumBuilding Your Own Native App  Visual Testing Module with Appium
Building Your Own Native App Visual Testing Module with Appium
 
Top 5 Features To Look for in a Codeless Automation Solution -- Presentation ...
Top 5 Features To Look for in a Codeless Automation Solution -- Presentation ...Top 5 Features To Look for in a Codeless Automation Solution -- Presentation ...
Top 5 Features To Look for in a Codeless Automation Solution -- Presentation ...
 
Data Visualization: Where (normal) people fall in love with data
Data Visualization: Where (normal) people fall in love with dataData Visualization: Where (normal) people fall in love with data
Data Visualization: Where (normal) people fall in love with data
 
“Building Mobile Optimized Websites,” Nick Bourgeois / Ray Villares
“Building Mobile Optimized Websites,” Nick Bourgeois / Ray Villares“Building Mobile Optimized Websites,” Nick Bourgeois / Ray Villares
“Building Mobile Optimized Websites,” Nick Bourgeois / Ray Villares
 
Building Mobile Optimized Websites
Building Mobile Optimized WebsitesBuilding Mobile Optimized Websites
Building Mobile Optimized Websites
 
Web Test Automation Framework - IndicThreads Conference
Web Test Automation Framework  - IndicThreads ConferenceWeb Test Automation Framework  - IndicThreads Conference
Web Test Automation Framework - IndicThreads Conference
 

More from adamcarmi (6)

Building Universal Servers (On-prem meets Azure PAAS)
Building Universal Servers (On-prem meets Azure PAAS)Building Universal Servers (On-prem meets Azure PAAS)
Building Universal Servers (On-prem meets Azure PAAS)
 
Build mobile application that is easy to automate
Build mobile application that is easy to automateBuild mobile application that is easy to automate
Build mobile application that is easy to automate
 
Advanced Cross-Browser Visual Testing with Applitools Eyes and HP LeanFT
Advanced Cross-Browser Visual Testing with Applitools Eyes and HP LeanFTAdvanced Cross-Browser Visual Testing with Applitools Eyes and HP LeanFT
Advanced Cross-Browser Visual Testing with Applitools Eyes and HP LeanFT
 
Selenium Automation at Incapsula
Selenium Automation at IncapsulaSelenium Automation at Incapsula
Selenium Automation at Incapsula
 
Jenkins & Selenium
Jenkins & SeleniumJenkins & Selenium
Jenkins & Selenium
 
An Overview of Selenium
An Overview of SeleniumAn Overview of Selenium
An Overview of Selenium
 

Recently uploaded

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Recently uploaded (20)

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 

Advanced automated visual testing with Selenium

  • 1. Adam Carmi (@carmiadam) Co-Founder and VP R&D at Applitools ADVANCED AUTOMATED VISUAL TESTING WITH SELENIUM
  • 2. YOU CAN AND SHOULD AUTOMATE YOUR VISUAL TESTS!
  • 3.
  • 4. AGENDA  Why automated visual testing?  Tools & Technology  Where does it fit?  Q & A
  • 5. WHAT IS VISUAL TESTING? A quality assurance activity aimed to verify that a Graphical User Interface appears correctly to users
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. WHY AUTOMATE? The test matrix is too big to cover manually  Web browsers  Devices  Operating systems  Screen resolutions  Responsive design  L10n  3rd Party upgrades
  • 11. WHY AUTOMATE? Mobile apps quality is critical  Harder to roll back changes  Can’t push daily  Updates take battery and data  Higher quality bar
  • 12. WHY AUTOMATE? Release cycles keep getting shorter
  • 13. AGENDA  Why automated visual testing?  Tools & Technology  Where does it fit?  Q & A
  • 14. HOW DOES IT WORK? Drive the AUT and take screenshots Compare screenshots with baseline images Report differences Update the baseline
  • 16. HOW DOES IT WORK? Drive the AUT and take screenshots Compare screenshots with baseline images Report differences Update the baseline
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24. AND MORE…  1 pixel offsets in element positioning  Dynamic content  Moving elements  Images of different size  Performance
  • 25.
  • 27. ImageMagick  A powerful command line tool for image processing.  Fuzzing is used to eliminate slight color differences  An error ratio is usually used to determine a match $ compare –metric AE –fuzz 5% img1.png img2.png diff.png 2246
  • 28. THE JAVASCRIPT ENGINES  Resemble.js Pixel by pixel + error ratio + anti-aliasing http://huddle.github.io/Resemble.js  Blink-Diff Pixel by pixel + error ratio + anti-aliasing + perceptual color distance computation https://github.com/yahoo/blink-diff  Looks-Same Pixel by pixel + perceptual color distance computation + ignore Caret https://github.com/gemini-testing/looks-same
  • 29. APPLITOOLS EYES  Handles anti-aliasing, pixel offsets, color similarity, and image scaling  Dynamic and moving content  Compare images of different sizes  No error ratio configuration required  Validates full UI pages  Fast!  Supports layout / structure matching
  • 31. HOW DOES IT WORK? Drive the AUT and take screenshots Compare screenshots with baseline images Report differences Update the baseline
  • 32. QUICK FEEDBACK TOOLS MOTIVATION  Get fast feedback on code changes  Run tests locally in the background SETUP  Render screenshots with a headless browser  PhatomJS, SlimerJS  Configuration file driven tests CONS  Partial coverage  Chrome, IE?  Old browser layout engine versions  Limited navigation
  • 33. VISUAL COVERAGE TOOLS MOTIVATION  Verify that the app / site looks right in all real execution environments  Test as many UI states as possible  Execute many tests in parallel SETUP  Render screenshots using real browsers on a variety of operating systems and devices in parallel  WebDriver, Grid  Code driven tests  WebDriver, DSLCONS  Requires test infrastructure  Implement and maintain test code
  • 34. SELENIUM BASED TOOLS CODE / SCRIPT ● Needle (Python WD) ● WebDriverCss (JS WebDriverIO) ● Gemini (JS DSL) ● Selenium Visual Diff (Java WD) ● VisualCeption (PHP CodeCeption) ● Pix-Diff (JS Protractor) ● Shoov (JS WebDriverIO) ● Vizregress (.NET WD) ● Rspec Page Regression (Capibara) ● Applitools Eyes (All WD + Appium) ● Fighting Layout Bugs (Java WebDriver) ● Huxley (Record Playback) CONFIGURATION ● Viff ● CSS Visual Test ● GreenOnion ● Wraith-Selenium
  • 35. HOW DOES IT WORK? Drive the AUT and take screenshots Compare screenshots with baseline images Report differences Update the baseline
  • 36. REPORT DIFFERENCES As files on the file system WebDriverCSS
  • 37. REPORT DIFFERENCES As a gallery Selenium Visual Diff
  • 38. HOW DOES IT WORK? Drive the AUT and take screenshots Compare screenshots with baseline images Report differences Update the baseline
  • 40.
  • 42. AGENDA  Why automated visual testing?  Tools & Technology  Where does it fit?  Q & A
  • 43. WHERE DOES IT FIT? • Component s • Code review • Developers • Designers • QA Visual testing of frontend components by frontend developers
  • 44. WHERE DOES IT FIT? • Pages • Page sections • Developers • Designers • QA • Others Full or partial validation of application screens A collaboration tool
  • 45. WHERE DOES IT FIT? • Staging vs. Production • Ops • QA Validate your staging deployment using your production deployment as a baseline
  • 46. WHERE DOES IT FIT? • Monitoring • Ops • QA No missing resources in production No corruption due to 3rd party data No corruption due to browser / OS upgrades
  • 47. Adam Carmi (@carmiadam) Co-Founder and VP R&D at Applitools QUESTIONS?