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
Snapshot Testing at CMD+U Conf
Search
Luis Ascorbe
July 08, 2016
Programming
140
2
Share
Snapshot Testing at CMD+U Conf
Luis Ascorbe
July 08, 2016
More Decks by Luis Ascorbe
See All by Luis Ascorbe
Dave Verwer's Slides at NSSpain 2014
lascorbe
0
130
Andrew Yates' Slides at NSSpain 2014
lascorbe
0
110
Alberto Lopez's Slides at NSSpain 2014
lascorbe
0
40
Erik Erice's Slides at NSSpain 2014
lascorbe
0
98
Krzysztof Zabłocki's Slides at NSSpain 2013
lascorbe
8
440
Luis Solano's Slides at NSSpain 2013
lascorbe
3
130
Daniel Eggert's Slides at NSSpain 2013
lascorbe
8
210
Nacho Soto's Slides at NSSpain 2013
lascorbe
4
130
Other Decks in Programming
See All in Programming
Claude Code Skill入門
mayahoney
0
460
ロボットのための工場に灯りは要らない
watany
12
3.3k
AI活用のコスパを最大化する方法
ochtum
0
360
PHP 7.4でもOpenTelemetryゼロコード計装がしたい! / PHPerKaigi 2026
arthur1
1
460
夢の無限スパゲッティ製造機 -実装篇- #phpstudy
o0h
PRO
0
180
Mastering Event Sourcing: Your Parents Holidayed in Yugoslavia
super_marek
0
130
L’IA au service des devs : Anatomie d'un assistant de Code Review
toham
0
170
OTP を自動で入力する裏技
megabitsenmzq
0
130
ファインチューニングせずメインコンペを解く方法
pokutuna
0
250
Kubernetesでセルフホストが簡単なNewSQLを求めて / Seeking a NewSQL Database That's Simple to Self-Host on Kubernetes
nnaka2992
0
190
The free-lunch guide to idea circularity
hollycummins
0
400
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.5k
Featured
See All Featured
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
200
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
27
3.4k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
250
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Six Lessons from altMBA
skipperchong
29
4.2k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
170
Automating Front-end Workflow
addyosmani
1370
200k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Design in an AI World
tapps
0
190
The Art of Programming - Codeland 2020
erikaheidi
57
14k
How to Ace a Technical Interview
jacobian
281
24k
Transcript
Snapshot Testing
@lascorbe
@lascorbe
What’s Testing?
What’s Snapshot Testing? Saved!
What’s Snapshot Testing? Saved! Recreate! ==
Calabash KIF UI Testing (Xcode)
Calabash KIF UI Testing (Xcode) Acceptance Tests
What’s Snapshot Testing? Unit Tests Integration Tests
What’s Snapshot Testing? Integration Tests Snapshot Tests Unit Tests
None
States
Text
Devices
Demo!
FBSnapshotTestCase
FBSnapshotTestCase CGContextRef
FBSnapshotTestCase CGContextRef CGContextRef
FBSnapshotTestCase CGContextRef CGContextRef <>
FBSnapshotTestCase CGContextRef CGContextRef <> memcmp()
Things to take into account
Arquitecture
Arquitecture Asynchronicity
Arquitecture Asynchronicity Autolayout
Arquitecture Asynchronicity Autolayout Repo space
What’s nice
See changes without running your app
Gorgeous PRs!
You’re testing a whole view at once
Gotta go fast! “0.015 to 0.080 seconds per test on
a Macbook Air” - @orta
Bonus point
Snapshots
Snapshots-Peek
Conclusion
Conclusion 1. Open your app 2. Write some snapshot tests
3. … 4. Profit!
https://github.com/facebook/ios-snapshot-test-case https://www.objc.io/issues/15-testing/snapshot-testing/ https://github.com/ashfurrow/Nimble-Snapshots https://github.com/dblock/ios-snapshot-test-case-expecta https://github.com/orta/snapshots https://github.com/orta/snapshots-peek https://github.com/Lascorbe/cmduconf-project
One more thing…
None
Sept 14-16 Logroño nsspain.com
cmduconf-rocks
@lascorbe