Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Snapshot Testing at CMD+U Conf
Search
Luis Ascorbe
July 08, 2016
Programming
160
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
140
Andrew Yates' Slides at NSSpain 2014
lascorbe
0
130
Alberto Lopez's Slides at NSSpain 2014
lascorbe
0
53
Erik Erice's Slides at NSSpain 2014
lascorbe
0
110
Krzysztof Zabłocki's Slides at NSSpain 2013
lascorbe
8
470
Luis Solano's Slides at NSSpain 2013
lascorbe
3
150
Daniel Eggert's Slides at NSSpain 2013
lascorbe
8
230
Nacho Soto's Slides at NSSpain 2013
lascorbe
4
150
Other Decks in Programming
See All in Programming
Verilogで学ぶCPU自作入門.pdf
uyuki234
7
3.9k
JRuby: Past, Present, and Future
headius
0
220
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
220
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
9.4k
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
390
iOSDC2026登壇資料.pdf
riofujimon
0
200
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
290
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
210
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.3k
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
510
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
270
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.3k
Featured
See All Featured
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
490
Technical Leadership for Architectural Decision Making
baasie
3
590
Joys of Absence: A Defence of Solitary Play
codingconduct
1
530
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
700
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
550
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
930
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