Getting started with Visual
Testing using Applitools
@BagmarAnand
Anand Bagmar
Software Quality Evangelist, Essence Of Testing
About Me
Anand Bagmar
EssenceOfTesting.com
@BagmarAnand
Game time!
@BagmarAnand
How do you test ….
@BagmarAnand
@BagmarAnand
http://littlecoffeefox.com/wp-content/uploads/2017/05/DSCN1738.jpg
@BagmarAnand
@BagmarAnand
@BagmarAnand
http://www.rfwireless-world.com/images/telecom-billing-system-architecture.jpg
What does this mean?
@BagmarAnand
What is missing here?
@BagmarAnand
How do you ensure what
was working before, is
working now as well!
@BagmarAnand
Spot the difference!
@BagmarAnand
It happens in Software too!
@BagmarAnand
https://cdn.pixabay.com/photo/2013/07/12/15/58/smiley-150663_1280.png
Surprise
It happens to Twitter
@BagmarAnand
It happens to UPS
@BagmarAnand
It Happens to Financial Times
@BagmarAnand
It Happens to Amazon
@BagmarAnand
UX / Visual Testing
The Missing Piece
@BagmarAnand
Test Automation Pyramid
Unit (xUnit / JavaScript)
Component
Integration
View
Web Service
UI
Manual / Exploratory
@BagmarAnand
Visual Testing
How do you do it?
@BagmarAnand
• Mostly done manually done
• Functional Automation can help
@BagmarAnand
Visual Testing
• Business / Revenue loss
• Brand / Credibility loss
• You loose your users!
@BagmarAnand
If Visual Testing is NOT done …..
• Mostly done manually done
• tedious
• very error prone
• impossible to scale and repeat – especially in days of CD!
• Functional Automation may help – a little
@BagmarAnand
Challenges of Visual Testing
Solution
Visual Test Automation
@BagmarAnand
• Create baselines by taking screenshots of expected UI
• Compare screenshots
• Whole page
• Snippets
• Update baselines as product evolves / changes
@BagmarAnand
How does it work?
Have you used any
Visual Testing tools?
@BagmarAnand
Challenges of Automating
Visual Testing
@BagmarAnand
• False positives / negatives
• Baseline maintenance
• Browsers
• Devices
• Resolutions / Viewports
• Result analysis & maintenance
@BagmarAnand
Challenges of Automated Visual Validation
AI in Visual Test Automation
@BagmarAnand
Visual Test Automation
needs a Strategy!
@BagmarAnand
A Simple
One Page,
Single Browser
Example
39
First, Let’s Provide Initial Coverage
18 Lines of
Code
21 Locators
and Labels
60 Minutes
40
Navigatio
n
Button
Click
Validatio
n
NEW
41
Real Bug Escapes
Text Changes
Caught
New Feature
Missed
Visual Bug
Escapes
Broken Locators
Next, We Test a New Build
2 Late
Stage Bugs
2 Changes
Caught
2 False
Positives
Baseline New Candidate
New Feature
Missed
Test Results Maintenance Action Time
Functional Bug Write Another Validation 15 mins
Visual Bug Try Writing New Validations, Then Give Up 15 mins
Placeholder Text Differences Update Existing Validations 10 mins
New Terms & Conditions
Feature
Write Another Validation 5 mins
Changed Locators Update Locators 15 mins
Total Time Spent 60 mins
Finally, We Have to Maintain our Tests
NEW
Plus Those 21 Locators and Labels That Might
Change Without any Notice!
Build and Maintenance Summary
43
Build & Maintain:
120 Minutes
Bug Detection:
40%
False Positive Rate:
40%
Login Page to Test
Remember Our
Simple Example?
Let’s Try Again.
44
45
Let’s Provide Initial Coverage Using Visual AI
2 Minutes to Create
Vs. 60 Minutes
1 Locator
Vs. 21 Locators
and Labels
46
Visual AI Handles the New Build
NEW
Functional Bug
Found
Text Changes
Found
Visual Bug Found
New Feature
Found
Original New Build
No Broken
Locators
All Bugs Found
Text Changes and
New Feature
Detected
0 Broken Locators
Test Results Visual AI Maintenance Action Legacy Visual AI
Functional Bug None; Found Automatically 15 mins 0 mins
Visual Bug None; Found Automatically 15 mins 0 mins
Placeholder Text Differences “Thumbs Up” for Each Difference 10 mins 40 secs
New Terms & Conditions Feature “Thumbs Up” for Difference 5 mins 20 secs
Changed Locators Locators No Longer Used 15 mins 0 mins
Total Time Spent 60 mins 1 min
Visual AI Streamlines Test Maintenance
NEW
Legacy Test Automation
Visual AI Delivers Results
48
Visual AI
40x Faster
21x More Stable
2.5x Increase in
Bug Detection
Eliminate False
Positives!
Build & Maintain:
3 Minutes
Locators:
1
Build & Maintain:
120 Minutes
Locators and Labels:
21
Bug Detection:
100%
Bug Detection:
40%
False Positive Rate:
0%
False Positive Rate:
40%
49
Legacy Test
Stack
Plus Applitools Visual
AI
Test
Frameworks
Selenium, Appium,
Cypress, Manual
Testing, Visual
DOM/Diff Tools, Etc.
80% Less Code
40x Faster
21x More Stable
Testing &
DevOps
Infrastructure
Jira, GitHub, BitBucket,
Slack Jenkins, Travis,
Circle, Azure, Sauce,
Perfecto, Browserstack
30x Faster
50% $$ Savings
Early Stage
Bug
Detection
Catch 2.5x More Bugs
No False Positives!
Fix Bugs In Minutes (Not
Hours)
Incredibly Accurate, Efficient Test Automation
Demo
@BagmarAnand
Test Pyramid … includes UX & NFRs
Unit (xUnit / JavaScript)
Component
Integration
View
Web Service
UI
P
e
r
f
o
r
m
a
n
c
e
S
e
c
u
r
i
t
y
Accessibility
UX
@BagmarAnand
Manual / Exploratory
• The Practical Test Pyramid -
https://martinfowler.com/articles/practical-test-pyramid.html
• Testing Pyramids & Ice-Cream Cones -
https://watirmelon.blog/testing-pyramids/
• Applitools – www.applitools.com
@BagmarAnand
References
Thank you!
Anand Bagmar
EssenceOfTesting.com
@BagmarAnand

Getting started with Visual Testing using Applitools - @TPC, Feb2020

  • 1.
    Getting started withVisual Testing using Applitools @BagmarAnand Anand Bagmar Software Quality Evangelist, Essence Of Testing
  • 2.
  • 3.
  • 4.
    How do youtest …. @BagmarAnand
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
    What does thismean? @BagmarAnand
  • 10.
    What is missinghere? @BagmarAnand
  • 11.
    How do youensure what was working before, is working now as well! @BagmarAnand
  • 12.
  • 17.
    It happens inSoftware too! @BagmarAnand https://cdn.pixabay.com/photo/2013/07/12/15/58/smiley-150663_1280.png Surprise
  • 20.
    It happens toTwitter @BagmarAnand
  • 21.
    It happens toUPS @BagmarAnand
  • 22.
    It Happens toFinancial Times @BagmarAnand
  • 23.
    It Happens toAmazon @BagmarAnand
  • 24.
    UX / VisualTesting The Missing Piece @BagmarAnand
  • 25.
    Test Automation Pyramid Unit(xUnit / JavaScript) Component Integration View Web Service UI Manual / Exploratory @BagmarAnand
  • 26.
    Visual Testing How doyou do it? @BagmarAnand
  • 27.
    • Mostly donemanually done • Functional Automation can help @BagmarAnand Visual Testing
  • 28.
    • Business /Revenue loss • Brand / Credibility loss • You loose your users! @BagmarAnand If Visual Testing is NOT done …..
  • 29.
    • Mostly donemanually done • tedious • very error prone • impossible to scale and repeat – especially in days of CD! • Functional Automation may help – a little @BagmarAnand Challenges of Visual Testing
  • 30.
  • 31.
    • Create baselinesby taking screenshots of expected UI • Compare screenshots • Whole page • Snippets • Update baselines as product evolves / changes @BagmarAnand How does it work?
  • 32.
    Have you usedany Visual Testing tools? @BagmarAnand
  • 33.
    Challenges of Automating VisualTesting @BagmarAnand
  • 34.
    • False positives/ negatives • Baseline maintenance • Browsers • Devices • Resolutions / Viewports • Result analysis & maintenance @BagmarAnand Challenges of Automated Visual Validation
  • 35.
    AI in VisualTest Automation @BagmarAnand
  • 36.
    Visual Test Automation needsa Strategy! @BagmarAnand
  • 37.
    A Simple One Page, SingleBrowser Example 39
  • 38.
    First, Let’s ProvideInitial Coverage 18 Lines of Code 21 Locators and Labels 60 Minutes 40 Navigatio n Button Click Validatio n
  • 39.
    NEW 41 Real Bug Escapes TextChanges Caught New Feature Missed Visual Bug Escapes Broken Locators Next, We Test a New Build 2 Late Stage Bugs 2 Changes Caught 2 False Positives Baseline New Candidate New Feature Missed
  • 40.
    Test Results MaintenanceAction Time Functional Bug Write Another Validation 15 mins Visual Bug Try Writing New Validations, Then Give Up 15 mins Placeholder Text Differences Update Existing Validations 10 mins New Terms & Conditions Feature Write Another Validation 5 mins Changed Locators Update Locators 15 mins Total Time Spent 60 mins Finally, We Have to Maintain our Tests NEW
  • 41.
    Plus Those 21Locators and Labels That Might Change Without any Notice! Build and Maintenance Summary 43 Build & Maintain: 120 Minutes Bug Detection: 40% False Positive Rate: 40%
  • 42.
    Login Page toTest Remember Our Simple Example? Let’s Try Again. 44
  • 43.
    45 Let’s Provide InitialCoverage Using Visual AI 2 Minutes to Create Vs. 60 Minutes 1 Locator Vs. 21 Locators and Labels
  • 44.
    46 Visual AI Handlesthe New Build NEW Functional Bug Found Text Changes Found Visual Bug Found New Feature Found Original New Build No Broken Locators All Bugs Found Text Changes and New Feature Detected 0 Broken Locators
  • 45.
    Test Results VisualAI Maintenance Action Legacy Visual AI Functional Bug None; Found Automatically 15 mins 0 mins Visual Bug None; Found Automatically 15 mins 0 mins Placeholder Text Differences “Thumbs Up” for Each Difference 10 mins 40 secs New Terms & Conditions Feature “Thumbs Up” for Difference 5 mins 20 secs Changed Locators Locators No Longer Used 15 mins 0 mins Total Time Spent 60 mins 1 min Visual AI Streamlines Test Maintenance NEW
  • 46.
    Legacy Test Automation VisualAI Delivers Results 48 Visual AI 40x Faster 21x More Stable 2.5x Increase in Bug Detection Eliminate False Positives! Build & Maintain: 3 Minutes Locators: 1 Build & Maintain: 120 Minutes Locators and Labels: 21 Bug Detection: 100% Bug Detection: 40% False Positive Rate: 0% False Positive Rate: 40%
  • 47.
    49 Legacy Test Stack Plus ApplitoolsVisual AI Test Frameworks Selenium, Appium, Cypress, Manual Testing, Visual DOM/Diff Tools, Etc. 80% Less Code 40x Faster 21x More Stable Testing & DevOps Infrastructure Jira, GitHub, BitBucket, Slack Jenkins, Travis, Circle, Azure, Sauce, Perfecto, Browserstack 30x Faster 50% $$ Savings Early Stage Bug Detection Catch 2.5x More Bugs No False Positives! Fix Bugs In Minutes (Not Hours) Incredibly Accurate, Efficient Test Automation
  • 48.
  • 49.
    Test Pyramid …includes UX & NFRs Unit (xUnit / JavaScript) Component Integration View Web Service UI P e r f o r m a n c e S e c u r i t y Accessibility UX @BagmarAnand Manual / Exploratory
  • 50.
    • The PracticalTest Pyramid - https://martinfowler.com/articles/practical-test-pyramid.html • Testing Pyramids & Ice-Cream Cones - https://watirmelon.blog/testing-pyramids/ • Applitools – www.applitools.com @BagmarAnand References
  • 51.