Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Visual Testing: A Communication Problem
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Bas Broek
June 15, 2018
Programming
140
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Visual Testing: A Communication Problem
Bas Broek
June 15, 2018
More Decks by Bas Broek
See All by Bas Broek
Roasting Your App's Accessibility
basthomas
0
53
Building an Accessibility Culture, One Step at a Time (Leeds)
basthomas
0
150
Building an Accessibility Culture, One Step at a Time
basthomas
1
120
Building a modern subscription experience on iOS
basthomas
0
220
Not an afterthought: accessibility from start to finish
basthomas
0
180
Accessibility on Apple Platforms: Beyond VoiceOver
basthomas
0
200
No Touch(screen) Required: Voice & Keyboard Accessibility
basthomas
0
190
Dancing with Dinosaurs: Objective-C and Swift Interop
basthomas
0
200
Effective Pull Request Reviews
basthomas
0
450
Other Decks in Programming
See All in Programming
源内ハンズオン概要編
hideg
0
110
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
210
OpenSpecのproposalにbrainstormingを持たせてみた
tigertora7571
1
200
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
210
ルールを書いて終わらせないハーネスエンジニアリング
yug1224
4
1.8k
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
1
480
Android CLI
fornewid
0
210
その節約、円になってますか?
isamumumu
1
690
今さら聞けない .NET CLI
htkym
0
180
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
180
20260722_microCMSで考える、AI時代のコンテンツ運用設計
yosh1
0
360
Japan Community Day at Kubecon + CloudNativeCon Japan 2026: Learning Container Privilege Control by Building My Own Low-Level Container Runtime
ternbusty
1
140
Featured
See All Featured
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
390
Building AI with AI
inesmontani
PRO
1
1.1k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
430
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
160
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
200
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
460
The Curse of the Amulet
leimatthew05
2
14k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Visualization
eitanlees
152
17k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Transcript
VISUAL TESTING A COMMUNICATION PROBLEM 1 — @basthomas
COMMUNICATION IS HARD 2 — @basthomas
SNAPSHOT TESTING 3 — @basthomas
func testViewWithSecondaryInteraction() { let viewUnderTest = InteractionBarView() let primaryInteractions: [Interaction]
= [.recommend, .comment, .like] let secondaryInteractions: [Interaction] = [.report] viewUnderTest.setup( withInteractions: primaryInteractions, secondaryInteractions: secondaryInteractions ) validateSnapshots(forView: viewUnderTest) } 4 — @basthomas
func testViewWithSecondaryInteraction() { let viewUnderTest = InteractionBarView() let primaryInteractions: [Interaction]
= [.recommend, .comment, .like] let secondaryInteractions: [Interaction] = [.report] viewUnderTest.setup( withInteractions: primaryInteractions, secondaryInteractions: secondaryInteractions ) validateSnapshots(forView: viewUnderTest) } 5 — @basthomas
func testViewWithSecondaryInteraction() { let viewUnderTest = InteractionBarView() let primaryInteractions: [Interaction]
= [.recommend, .comment, .like] let secondaryInteractions: [Interaction] = [.report] viewUnderTest.setup( withInteractions: primaryInteractions, secondaryInteractions: secondaryInteractions ) validateSnapshots(forView: viewUnderTest) } 6 — @basthomas
func testViewWithSecondaryInteraction() { let viewUnderTest = InteractionBarView() let primaryInteractions: [Interaction]
= [.recommend, .comment, .like] let secondaryInteractions: [Interaction] = [.report] viewUnderTest.setup( withInteractions: primaryInteractions, secondaryInteractions: secondaryInteractions ) validateSnapshots(forView: viewUnderTest) } 7 — @basthomas
func testViewWithSecondaryInteraction() { let viewUnderTest = InteractionBarView() let primaryInteractions: [Interaction]
= [.recommend, .comment, .like] let secondaryInteractions: [Interaction] = [.report] viewUnderTest.setup( withInteractions: primaryInteractions, secondaryInteractions: secondaryInteractions ) validateSnapshots(forView: viewUnderTest) } 8 — @basthomas
func testViewWithSecondaryInteraction() { let viewUnderTest = InteractionBarView() let primaryInteractions: [Interaction]
= [.recommend, .comment, .like] let secondaryInteractions: [Interaction] = [.report] viewUnderTest.setup( withInteractions: primaryInteractions, secondaryInteractions: secondaryInteractions ) validateSnapshots(forView: viewUnderTest) } 9 — @basthomas
10 — @basthomas
WHAT IF THE DESIGN CHANGES? 11 — @basthomas
WHAT IF ONE OF THE PRIMARY INTERACTIONS CHANGES? 12 —
@basthomas
! 13 — @basthomas
IT IS EASY TO MAKE A MISTAKE 14 — @basthomas
NAMING IS HARD 15 — @basthomas
NAMING IS HARD > testCellWithPageControlOnPage2of3 > testCellWithLongNameAndJob > testWithShortContent >
testTwoBirthdaysUnseenElement > testStateLoadMoreFailedInsertedOnTop > testSlideupViewWithNoIconNoButton 16 — @basthomas
DO YOU HAVE ANY IDEA WHAT IT IS WE'RE TESTING
HERE? 17 — @basthomas
... MAYBE? 18 — @basthomas
DO YOU HAVE ANY IDEA WHEN THESE TESTS ARE EXPECTEDLY
FAILING? 19 — @basthomas
ME NEITHER 20 — @basthomas
A FAILING SNAPSHOT TEST 21 — @basthomas
22 — @basthomas
testCellWithPageControlOnPage2of3 SO, IT SHOULDN'T BE 23 — @basthomas
! 24 — @basthomas
REPLACEABLE BY UNIT TESTS 25 — @basthomas
SNAPSHOTS AT SCALE 26 — @basthomas
WE MADE IT HARDER ON OURSELVES FORK, WRAPPER, WRAPPER, WRAPPER
27 — @basthomas
DOCUMENT DECISIONS 28 — @basthomas
MULTIPLE SIMULATORS 29 — @basthomas
SPACE 30 — @basthomas
IDE UPDATES 31 — @basthomas
! 32 — @basthomas
!"!"!"!"! !"!"!"!"! !"!"!"!"! !"!"!"!"! !"!"!"!"! 33 — @basthomas
SNAPSHOTS ARE SUBJECTIVE 34 — @basthomas
IT IS NOT ALL BAD 35 — @basthomas
QUESTION THINGS > "but I just copied it" > "but
others are doing it" > "but I can't write a unit test here" > "but ..." 36 — @basthomas
HOW TO PREVENT THIS 37 — @basthomas
DOCUMENT 38 — @basthomas
DOCUMENT COMMUNICATE 39 — @basthomas
DOCUMENT COMMUNICATE QUESTION THINGS 40 — @basthomas
DOCUMENT COMMUNICATE QUESTION THINGS ITERATE 41 — @basthomas
THANKS! 42 — @basthomas