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
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
930
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
5
900
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
From Translations to Multi Dimension Entities
alexanderschranz
2
130
range over funcの使い道と非同期N+1リゾルバーの夢 / about a range over func
mackee
0
110
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
330
クリエイティブコーディングとRuby学習 / Creative Coding and Learning Ruby
chobishiba
0
3.9k
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
200
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
280
fs2-io を試してたらバグを見つけて直した話
chencmd
0
230
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
130
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
520
39k
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
Fireside Chat
paigeccino
34
3.1k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
520
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Faster Mobile Websites
deanohume
305
30k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Bash Introduction
62gerente
608
210k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
Rails Girls Zürich Keynote
gr2m
94
13k
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