Automated Visual Testing - What, When & How

40
Adam Carmi (@carmiadam) Co-Founder and VP R&D at Applitools [email protected] AUTOMATED VISUAL TESTING WHAT, WHEN & HOW

Transcript of Automated Visual Testing - What, When & How

Page 1: Automated Visual Testing - What, When & How

Adam Carmi (@carmiadam)Co-Founder and VP R&D at Applitools

[email protected]

AUTOMATED VISUAL TESTING

WHAT, WHEN & HOW

Page 2: Automated Visual Testing - What, When & How

AGENDA

Why automated visual testing?Tools & TechnologyWhere does it fit?Q & A

Page 3: Automated Visual Testing - What, When & How

WHAT IS VISUAL TESTING?

A quality assurance activity aimed to verify that a

Graphical User Interface appears correctly to users

Page 4: Automated Visual Testing - What, When & How

A VISUAL BUG

Page 5: Automated Visual Testing - What, When & How

AND ANOTHER…

Page 6: Automated Visual Testing - What, When & How

AND YET ANOTHER (IE 8 NOT OK)…

Page 7: Automated Visual Testing - What, When & How

AND YET ANOTHER (IE 11 OK)…

Page 8: Automated Visual Testing - What, When & How

AND THE LAST ONE…

Page 9: Automated Visual Testing - What, When & How

WHY SHOULD IT BE AUTOMATED?

THE TEST MATRIX IS TOO BIG TO APPROXIMATE MANUALLY

Web browsers Devices Operating systems Screen resolutions Responsive designs L10n

Page 10: Automated Visual Testing - What, When & How

WHY SHOULD IT BE AUTOMATED?

Page 11: Automated Visual Testing - What, When & How

WHY SHOULD IT BE AUTOMATED?

NATIVE / HYBRID MOBILE APPS

Harder to roll back changesCan’t push dailyUpdates take battery and data

Higher quality bar

Page 12: Automated Visual Testing - What, When & How

MANUALVISUALTESTINGISERRORPRONE

WHY SHOULD IT BE AUTOMATED?

Page 13: Automated Visual Testing - What, When & How

AGENDA

Why automated visual testing?Tools & TechnologyWhere does it fit?

Page 14: Automated Visual Testing - What, When & How

THE WORKFLOW Drive the AUT and take screenshots

Compare screenshots with baseline images

Report differences

Update the baseline

Page 15: Automated Visual Testing - What, When & How

THE WORKFLOW Drive the AUT and take screenshots

Compare screenshots with baseline images

Report differences

Update the baseline

Page 16: Automated Visual Testing - What, When & How

DRIVING AND CAPTURING

OTHER• Wraith (URLs)• PhantomCSS (CJS)• dpdxt (URLs)• Grunt PhotoBox

(URLs)• Snap And Compare

(URLs)• Specter (JS)• Gemini (JS)• Grunt-Vigo (URLs)• BackstopJS (URLs)• Applitools Eyes (All)

• WebDriverCSS (JS)• Fighting Layout Bugs

(Java)• Wraith-Selenium

(Ruby)• Selenium Visual Diff

(Java)• Needle (Python)• VisualCeption (PHP)• Huxley (RP)• Gemini (JS)• Vizregress (.NET)• Visualci (Java)• Viff (JS)• Pix-Diff (JS)• Applitools Eyes (All)

• CSS Critic (URLs)• FBSnapshotTestC

ase (XCTest)• Kobold (folders)• Applitools Eyes

(All)

Page 17: Automated Visual Testing - What, When & How

DRIVINGAND CAPTURINGWITHSELENIUM

(WebDriverCSS)

Page 18: Automated Visual Testing - What, When & How

MANUALLY WITH EYES EXPRESS

Page 19: Automated Visual Testing - What, When & How

THE WORKFLOW Drive the AUT and take screenshots

Compare screenshots with baseline images

Report differences

Update the baseline

Page 20: Automated Visual Testing - What, When & How
Page 21: Automated Visual Testing - What, When & How

WHY NOT?

FALSE POSITIVES

Page 22: Automated Visual Testing - What, When & How

ANTI ALIASING 1/2

Page 23: Automated Visual Testing - What, When & How

ANTI ALIASING 2/2

Page 24: Automated Visual Testing - What, When & How

IMAGE SCALING 1/2

Page 25: Automated Visual Testing - What, When & How

IMAGE SCALING 2/2

Page 26: Automated Visual Testing - What, When & How

AND MORE…1 pixel offsets in element positioning

Dynamic contentMoving elementsImages of different sizePerformance

Page 27: Automated Visual Testing - What, When & How

DEMO

Page 28: Automated Visual Testing - What, When & How

THE WORKFLOW Drive the AUT and take screenshots

Compare screenshots with baseline images

Report differences

Update the baseline

Page 29: Automated Visual Testing - What, When & How

REPORT DIFFERENCESAs files on the file system (combined with source control)

Page 30: Automated Visual Testing - What, When & How

REPORT DIFFERENCESAs a Gallery (example from Selenium Visual Diff)

Page 31: Automated Visual Testing - What, When & How

THE WORKFLOW Drive the AUT and take screenshots

Compare screenshots with baseline images

Report differences

Update the baseline

Page 32: Automated Visual Testing - What, When & How

UPDATE THE BASELINE

Rename or commit individual image files

GUI (Gemini GUI)

Page 33: Automated Visual Testing - What, When & How

UPDATE THE BASELINE

Overwrite mode

Automatic maintenance (Applitools Eyes)

Page 34: Automated Visual Testing - What, When & How

AGENDA

Why automated visual testing?Tools & TechnologyWhere does it fit?

Page 35: Automated Visual Testing - What, When & How

WHERE DOES IT FIT?

• Components

• Code review

• Developers

• Designers• QA

Visual testing of frontend components by frontend developers

Page 36: Automated Visual Testing - What, When & How

WHERE DOES IT FIT?

• Pages• Page

sections

• Developers

• Designers• QA• Others

Full or partial validation of application screensA collaboration tool

Page 37: Automated Visual Testing - What, When & How

WHERE DOES IT FIT?

• Staging vs. Production

• Ops• QA

Validate your staging deployment using your production deployment as a baseline

Page 38: Automated Visual Testing - What, When & How

WHERE DOES IT FIT?

• Monitoring

• Ops• QA

No missing resources in productionNo corruption due to 3rd party dataNo corruption due to browser / OS upgrades

Page 39: Automated Visual Testing - What, When & How

QUESTIONS?

Page 40: Automated Visual Testing - What, When & How

Adam Carmi (@carmiadam)Co-Founder and VP R&D at Applitools

[email protected]

THANK YOU