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
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
Assistive Access: Reinventing Your App for a New (sort of) Generation
basthomas
0
11
Roasting Your App's Accessibility
basthomas
0
54
Building an Accessibility Culture, One Step at a Time (Leeds)
basthomas
0
150
Building an Accessibility Culture, One Step at a Time
basthomas
1
130
Building a modern subscription experience on iOS
basthomas
0
230
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
Other Decks in Programming
See All in Programming
Google Apps Script で Ruby を動かす
kawahara
0
150
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.7k
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
170
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
210
生成AI導入の「期待外れ」を乗り越える ー 開発フロー改革が目指す、真の組織変革
starfish719
0
4.3k
楽しそうなつよつよエンジニアと目が死んでる僕/A brilliant engineer having a blast, and dead-eyed me.
3l4l5
2
110
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
2
270
5分で問診!Composer セキュリティ健康診断
codmoninc
0
950
Foundation Models frameworkで画像分析
ryodeveloper
1
610
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
250
AIが無かった頃の素敵な出会いの話
codmoninc
1
410
170k Jobs a Day on GKE: Scaling Mercari's CI Platform - and What's Next for AI-Native Development
junyaokabe
0
100
Featured
See All Featured
How to make the Groovebox
asonas
2
2.3k
Embracing the Ebb and Flow
colly
88
5.1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Ethics towards AI in product and experience design
skipperchong
2
340
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
The Cult of Friendly URLs
andyhume
79
7k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.7k
Done Done
chrislema
186
16k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
Product Roadmaps are Hard
iamctodd
55
12k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.5k
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