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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Luis Ascorbe
July 08, 2016
Programming
150
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
120
Alberto Lopez's Slides at NSSpain 2014
lascorbe
0
45
Erik Erice's Slides at NSSpain 2014
lascorbe
0
100
Krzysztof Zabłocki's Slides at NSSpain 2013
lascorbe
8
460
Luis Solano's Slides at NSSpain 2013
lascorbe
3
140
Daniel Eggert's Slides at NSSpain 2013
lascorbe
8
220
Nacho Soto's Slides at NSSpain 2013
lascorbe
4
140
Other Decks in Programming
See All in Programming
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
140
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
130
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.4k
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.3k
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
270
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
160
CSC307 Lecture 17
javiergs
PRO
0
320
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.6k
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
6
1.4k
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
300
Inside Stream API
skrb
1
740
Performance Engineering for Everyone
elenatanasoiu
0
180
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
540
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Thoughts on Productivity
jonyablonski
76
5.2k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
150
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
4 Signs Your Business is Dying
shpigford
187
22k
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