SlideShare a Scribd company logo
1 of 50
Download to read offline
1axelerant.com@shwetasharma84
Advanced Automated
Visual Testing
— Shweta Sharma
@shwetasharma84
2axelerant.com@shwetasharma84
About Me
{
"name": "Shweta",
"country": "India",
"city": "Pune",
"work": "Director of Quality Assurance Services",
"email": "shwetasharma@axelerant.com",
"social_media": {
"twitter": "@shwetasharma84",
"linkedin": "@shwetaneelsharma",
"github": "@shwetaneelsharma",
"skype": "@shweta_ns"
},
"hobbies": [
"classical dancing",
"globetrotting",
"watching stand-up comedy"
]
}
3axelerant.com@shwetasharma84
Axelerant from above
Fully-distributed, 6 Time Zones
10 Years Of Growth
110+ Enthusiastic, Kind,
Open Professionals
150+ Partner Engagements
1,000+ Open Source
Contributions
@shwetasharma84
4axelerant.com@shwetasharma84
Agenda
● What is Automated Visual testing?
● Why do we need it?
● How does it work?
● Challenges with Automated Visual testing
● How to addresses these challenges?
● Strategy to design and execute automated visual tests
● Automated visual tests in the CI/CD pipeline
● A quick comparison of available tools
● How to get started?
5axelerant.com@shwetasharma84
What is Automated Visual testing?
● Visually validate the following:
○ User Interface
■ Content
■ Page layout
○ Browsers and devices
6axelerant.com@shwetasharma84
Why do we need it?
Human Factor
Larger Device/OS Matrix
Larger Release Cycles
Invest time to QA new
features
7axelerant.com@shwetasharma84
How does it work?
Test Runner
Capture screenshots at run time
Report differences
Update baselineBug
Compare
Capture baseline images
First run
Subsequent runs
unintended
intended
8axelerant.com@shwetasharma84
Site for demo
9axelerant.com@shwetasharma84
BackstopJS - viewports and scenario defined
10axelerant.com@shwetasharma84
BackstopJS - create baseline/reference shots
11axelerant.com@shwetasharma84
BackstopJS - baseline/reference shots created
12axelerant.com@shwetasharma84
BackstopJS - Rerun the test
13axelerant.com@shwetasharma84
BackstopJS - Execution result (Desktop)
14axelerant.com@shwetasharma84
BackstopJS - Execution result (Phone)
15axelerant.com@shwetasharma84
BackstopJS - Execution result (Tablet)
16axelerant.com@shwetasharma84
Challenges
Anti Aliasing Dynamic Content
17axelerant.com@shwetasharma84
Challenge - Dynamic content (slideshow)
18axelerant.com@shwetasharma84
Challenge - Dynamic content demo
19axelerant.com@shwetasharma84
How few tools handle some challenges
Hide
● Hide all elements queried by
WebdriverIO selector strategies
● Element’s space is filled and
considered in the layout of the
screenshot captured
● Good candidates - Ad blocks, Images
that change
Remove
● Remove all elements queried by
WebdriverIO selector strategies
● Element is removed from the DOM -
affects the design of the page
● Good candidates - Sticky
headers/footers, popover help/chat
windows
NOTE: Visual regression service is available till version 4.*. It is replaced by Applitools service from 5.*
20axelerant.com@shwetasharma84
How few tools handle some challenges
21axelerant.com@shwetasharma84
How few tools handle some challenges
22axelerant.com@shwetasharma84
How can be Antialiasing handled?
● Use of docker
○ Environment is the same every time
● Run visual tests on cloud
○ BrowserStack
○ SauceLabs
● Select a tool which handles it implicitly
23axelerant.com@shwetasharma84
Browserstack - WebdriverIO
24axelerant.com@shwetasharma84
Browserstack
25axelerant.com@shwetasharma84
How we integrated in our development workflow?
BUILD
CI PIPELINE
COMMIT
CODE
ACCEPTANCE
TESTING
VISUAL
REGRESSION
DATA
SEEDING
CD PIPELINE
REVIEW
STAGING
PRODUCTION
DB-docker
26axelerant.com@shwetasharma84
The actual implementation
27axelerant.com@shwetasharma84
The actual implementation
28axelerant.com@shwetasharma84
The actual implementation
29axelerant.com@shwetasharma84
The actual implementation
30axelerant.com@shwetasharma84
The actual implementation
31axelerant.com@shwetasharma84
The actual implementation
32axelerant.com@shwetasharma84
The actual implementation
33axelerant.com@shwetasharma84
Base build selection logic in Percy
* Taken from https://docs.percy.io/docs/baseline-picking-logic
34axelerant.com@shwetasharma84
Key results achieved
● Test data
○ Time saved to handle dynamic content scenarios because of data consistency
○ Minimal efforts for Visual tests
● Seamless integration of Automation tools involved
● Visual tests validated for the site which is a replica of the wireframe
● Less number of assertions required for the Acceptance test Automation suite
35axelerant.com@shwetasharma84
Example - No functional assertion
36axelerant.com@shwetasharma84
Good practices to follow
● Plan the level of visual coverage needed
● Organize Test Suites
○ Browser wise
○ Feature wise
○ Device wise
● Speed up test execution by running tests in parallel
● Identify the frequency to run visual tests
37axelerant.com@shwetasharma84
Good practices to follow
38axelerant.com@shwetasharma84
Good practices to follow
39axelerant.com@shwetasharma84
Applitools
● No pixel to pixel comparison
● In-built support for anti-aliasing
● 40+ SDKs available free to use
○ Different programming languages
○ Test Runners
○ Web/Mobile apps
○ Quick to extend your current tests to include Visual Validation
● Handles dynamic content which is also floating/shifting
● Provides seamless collaboration
● Applitools SIDE browser extension (Chrome and Firefox)
● Integrations
○ Jira
○ HP Quality Center
○ Several CI tools
● Free Support for open source projects
40axelerant.com@shwetasharma84
Match Levels in Applitools
Strict
● Recommended
● Content
● Font
● Layout
● Color
● Position of elements
Layout
● Tests the layout
● Validates the alignment
and relative position of
all elements on the page,
such as: buttons, menus,
text areas, paragraphs,
images, and columns
● Ignores the content,
colour and other style
changes between the
pages
Content
● Similar to Strict
● Compares content but
ignores colors
41axelerant.com@shwetasharma84
Applitools Dashboard - Baseline shots
42axelerant.com@shwetasharma84
Applitools Dashboard
43axelerant.com@shwetasharma84
Applitools Dashboard - Collaborative
44axelerant.com@shwetasharma84
Applitools Dashboard - Dynamic content
45axelerant.com@shwetasharma84
Applitools Dashboard - Match levels
46axelerant.com@shwetasharma84
When to use what?
Static content
● Wraith
● PhantomCSS
● Spectre
Shifting Content
● Applitools (SDKs and
Selenium IDE extension)
Dynamic content
● WebdriverIO Visual
regression service
● Percy
● Shoov
● BackstopJS
● WebdriverCSS
● Gemini
47axelerant.com@shwetasharma84
Hard hitting facts
● Efforts needed to maintain baseline images
● Respect the Test Pyramid
○ Include Unit tests, Service tests, Acceptance tests and Visual tests
● Best practices in Automating Visual tests:
○ Ensure full page validation
○ Do not have too many element specific tests
■ Avoid element locators maintenance
○ General rules for automating Acceptance tests apply here too:
■ Pick up the right candidates for Automation
■ Logical division of tests
■ Make use of Seams
● Do not expect overnight success
48axelerant.com@shwetasharma84
References
● https://github.com/garris/BackstopJS
● http://v4.webdriver.io/guide/services/visual-regression.html
● https://applitools.com/tutorials/selenium-ide.html
● https://www.axelerant.com/resources/team-blog/visual-regression-testing-u
sing-wraith
● https://www.browserstack.com/automate/webdriverio
● https://percy.io/
49axelerant.com@shwetasharma84
Session feedback
https://www.surveymonkey.com/r/DCGlobal20SessionEval?title=VisualTestin
g&id=30364
50axelerant.com@shwetasharma84
Q & A
● Concept of Automated Visual testing
● Algorithm around all tools
● Challenges in Automated Visual
testing
● Challenges handled by WebdriverIO
and Applitools
● Gold Master Testing
● Good practices
Twitter - @shwetasharma84
LinkedIn - @shwetaneelsharma
GitHub - @shwetaneelsharma
Email - shwetasharma@axelerant.com
Skype - @shweta_ns

More Related Content

Similar to Advanced automated visual testing - DrupalCon Global 2020

Chip_Swanson-Resume-2016-1
Chip_Swanson-Resume-2016-1Chip_Swanson-Resume-2016-1
Chip_Swanson-Resume-2016-1Chip Swanson
 
CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton Araf Karsh Hamid
 
H2o.ai presentation at 2nd Virtual Pydata Piraeus meetup
H2o.ai presentation at 2nd Virtual Pydata Piraeus meetupH2o.ai presentation at 2nd Virtual Pydata Piraeus meetup
H2o.ai presentation at 2nd Virtual Pydata Piraeus meetupPyData Piraeus
 
Citrix Labs Rapid Prototyping Workshop
Citrix Labs Rapid Prototyping WorkshopCitrix Labs Rapid Prototyping Workshop
Citrix Labs Rapid Prototyping WorkshopReuven Cohen
 
UX Prototyping: New Principles and Tools (HTP Grodno, 20.03.2018)
UX Prototyping: New Principles and Tools (HTP Grodno, 20.03.2018)UX Prototyping: New Principles and Tools (HTP Grodno, 20.03.2018)
UX Prototyping: New Principles and Tools (HTP Grodno, 20.03.2018)Ilya Zakharau
 
Path Analyzer X-Files: How We Built the Ultimate xDB Forensic Tool
Path Analyzer X-Files: How We Built the Ultimate xDB Forensic ToolPath Analyzer X-Files: How We Built the Ultimate xDB Forensic Tool
Path Analyzer X-Files: How We Built the Ultimate xDB Forensic ToolSitecore
 
NYCACE April 2022 Presentations.pdf
NYCACE April 2022 Presentations.pdfNYCACE April 2022 Presentations.pdf
NYCACE April 2022 Presentations.pdfAUGNYC
 
Getting Started With SharePoint REST API in Nintex Workflows for Office 365 I...
Getting Started With SharePoint REST API in Nintex Workflows for Office 365 I...Getting Started With SharePoint REST API in Nintex Workflows for Office 365 I...
Getting Started With SharePoint REST API in Nintex Workflows for Office 365 I...Prashant G Bhoyar (Microsoft MVP)
 
What to Expect from Sahi Pro
What to Expect from Sahi ProWhat to Expect from Sahi Pro
What to Expect from Sahi ProTyto Software
 
Google Platform Overview (April 2014)
Google Platform Overview (April 2014)Google Platform Overview (April 2014)
Google Platform Overview (April 2014)Ido Green
 
Wireframes, prototypes and mockups - comparison of tools.
Wireframes, prototypes and mockups - comparison of tools.Wireframes, prototypes and mockups - comparison of tools.
Wireframes, prototypes and mockups - comparison of tools.Dominik Cichy
 
SEO with Liferay
SEO with LiferaySEO with Liferay
SEO with Liferayrivetlogic
 
ApacheCon NA 2019 : Customer segmentation and personalization using apache unomi
ApacheCon NA 2019 : Customer segmentation and personalization using apache unomiApacheCon NA 2019 : Customer segmentation and personalization using apache unomi
ApacheCon NA 2019 : Customer segmentation and personalization using apache unomiSerge Huber
 
It is easy contributing to open source - JCON 2020
It is easy contributing to open source - JCON 2020It is easy contributing to open source - JCON 2020
It is easy contributing to open source - JCON 2020César Hernández
 
Group 3 slide presentation
Group 3 slide presentationGroup 3 slide presentation
Group 3 slide presentationMichael Young
 

Similar to Advanced automated visual testing - DrupalCon Global 2020 (20)

Chip_Swanson-Resume-2016-1
Chip_Swanson-Resume-2016-1Chip_Swanson-Resume-2016-1
Chip_Swanson-Resume-2016-1
 
CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton
 
H2o.ai presentation at 2nd Virtual Pydata Piraeus meetup
H2o.ai presentation at 2nd Virtual Pydata Piraeus meetupH2o.ai presentation at 2nd Virtual Pydata Piraeus meetup
H2o.ai presentation at 2nd Virtual Pydata Piraeus meetup
 
Citrix Labs Rapid Prototyping Workshop
Citrix Labs Rapid Prototyping WorkshopCitrix Labs Rapid Prototyping Workshop
Citrix Labs Rapid Prototyping Workshop
 
UX Prototyping: New Principles and Tools (HTP Grodno, 20.03.2018)
UX Prototyping: New Principles and Tools (HTP Grodno, 20.03.2018)UX Prototyping: New Principles and Tools (HTP Grodno, 20.03.2018)
UX Prototyping: New Principles and Tools (HTP Grodno, 20.03.2018)
 
PWA to React Native migration
PWA to React Native migrationPWA to React Native migration
PWA to React Native migration
 
Path Analyzer X-Files: How We Built the Ultimate xDB Forensic Tool
Path Analyzer X-Files: How We Built the Ultimate xDB Forensic ToolPath Analyzer X-Files: How We Built the Ultimate xDB Forensic Tool
Path Analyzer X-Files: How We Built the Ultimate xDB Forensic Tool
 
NYCACE April 2022 Presentations.pdf
NYCACE April 2022 Presentations.pdfNYCACE April 2022 Presentations.pdf
NYCACE April 2022 Presentations.pdf
 
Getting Started With SharePoint REST API in Nintex Workflows for Office 365 I...
Getting Started With SharePoint REST API in Nintex Workflows for Office 365 I...Getting Started With SharePoint REST API in Nintex Workflows for Office 365 I...
Getting Started With SharePoint REST API in Nintex Workflows for Office 365 I...
 
What to Expect from Sahi Pro
What to Expect from Sahi ProWhat to Expect from Sahi Pro
What to Expect from Sahi Pro
 
Building a Slack Bot Workshop @ Nearsoft OctoberTalks 2017
Building a Slack Bot Workshop @ Nearsoft OctoberTalks 2017Building a Slack Bot Workshop @ Nearsoft OctoberTalks 2017
Building a Slack Bot Workshop @ Nearsoft OctoberTalks 2017
 
Google Platform Overview (April 2014)
Google Platform Overview (April 2014)Google Platform Overview (April 2014)
Google Platform Overview (April 2014)
 
Wireframes, prototypes and mockups - comparison of tools.
Wireframes, prototypes and mockups - comparison of tools.Wireframes, prototypes and mockups - comparison of tools.
Wireframes, prototypes and mockups - comparison of tools.
 
Rive
RiveRive
Rive
 
SEO with Liferay
SEO with LiferaySEO with Liferay
SEO with Liferay
 
WordPress UX Workflow
WordPress UX WorkflowWordPress UX Workflow
WordPress UX Workflow
 
Sencha Services
Sencha ServicesSencha Services
Sencha Services
 
ApacheCon NA 2019 : Customer segmentation and personalization using apache unomi
ApacheCon NA 2019 : Customer segmentation and personalization using apache unomiApacheCon NA 2019 : Customer segmentation and personalization using apache unomi
ApacheCon NA 2019 : Customer segmentation and personalization using apache unomi
 
It is easy contributing to open source - JCON 2020
It is easy contributing to open source - JCON 2020It is easy contributing to open source - JCON 2020
It is easy contributing to open source - JCON 2020
 
Group 3 slide presentation
Group 3 slide presentationGroup 3 slide presentation
Group 3 slide presentation
 

Recently uploaded

Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...soginsider
 
Air Compressor reciprocating single stage
Air Compressor reciprocating single stageAir Compressor reciprocating single stage
Air Compressor reciprocating single stageAbc194748
 
Rums floating Omkareshwar FSPV IM_16112021.pdf
Rums floating Omkareshwar FSPV IM_16112021.pdfRums floating Omkareshwar FSPV IM_16112021.pdf
Rums floating Omkareshwar FSPV IM_16112021.pdfsmsksolar
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdfKamal Acharya
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwaitjaanualu31
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projectssmsksolar
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdfKamal Acharya
 
Learn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksLearn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksMagic Marks
 

Recently uploaded (20)

Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
Air Compressor reciprocating single stage
Air Compressor reciprocating single stageAir Compressor reciprocating single stage
Air Compressor reciprocating single stage
 
Rums floating Omkareshwar FSPV IM_16112021.pdf
Rums floating Omkareshwar FSPV IM_16112021.pdfRums floating Omkareshwar FSPV IM_16112021.pdf
Rums floating Omkareshwar FSPV IM_16112021.pdf
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Learn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksLearn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic Marks
 

Advanced automated visual testing - DrupalCon Global 2020