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
2
130
Snapshot Testing at CMD+U Conf
Luis Ascorbe
July 08, 2016
Tweet
Share
More Decks by Luis Ascorbe
See All by Luis Ascorbe
Dave Verwer's Slides at NSSpain 2014
lascorbe
0
120
Andrew Yates' Slides at NSSpain 2014
lascorbe
0
100
Alberto Lopez's Slides at NSSpain 2014
lascorbe
0
35
Erik Erice's Slides at NSSpain 2014
lascorbe
0
84
Krzysztof Zabłocki's Slides at NSSpain 2013
lascorbe
8
440
Luis Solano's Slides at NSSpain 2013
lascorbe
3
120
Daniel Eggert's Slides at NSSpain 2013
lascorbe
8
200
Nacho Soto's Slides at NSSpain 2013
lascorbe
4
130
Other Decks in Programming
See All in Programming
watsonx.ai Dojo #4 生成AIを使ったアプリ開発、応用編
oniak3ibm
PRO
1
210
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
1.1k
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
130
Jakarta EE meets AI
ivargrimstad
0
800
[Do iOS '24] Ship your app on a Friday...and enjoy your weekend!
polpielladev
0
120
Amazon Qを使ってIaCを触ろう!
maruto
0
420
RubyLSPのマルチバイト文字対応
notfounds
0
120
flutterkaigi_2024.pdf
kyoheig3
0
180
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.8k
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
140
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
300
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
What's new in Ruby 2.0
geeforr
343
31k
Embracing the Ebb and Flow
colly
84
4.5k
The Language of Interfaces
destraynor
154
24k
Why Our Code Smells
bkeepers
PRO
334
57k
Optimizing for Happiness
mojombo
376
70k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Making Projects Easy
brettharned
115
5.9k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
140
4 Signs Your Business is Dying
shpigford
180
21k
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