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
170
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
Transcript
41 slides
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
More Decks by Luis Ascorbe
See All by Luis Ascorbe
Dave Verwer's Slides at NSSpain 2014
lascorbe
0
150
Andrew Yates' Slides at NSSpain 2014
lascorbe
0
130
Alberto Lopez's Slides at NSSpain 2014
lascorbe
0
56
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
160
Daniel Eggert's Slides at NSSpain 2013
lascorbe
8
230
Nacho Soto's Slides at NSSpain 2013
lascorbe
4
160
Other Decks in Programming
See All in Programming
Claude Codeのおかげでやりたいことがやれるようになったんだよォー!
sms_tech
0
150
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
1k
Rails初心者がパスキーを実装してみて大変だったこと
ktombow
0
220
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
6.1k
Proxmox x Talos Linux x Terraform で実現するなんかいい感じの Kubernetes クラスタ / A Sleek Kubernetes Cluster Powered by Proxmox, Talos Linux, and Terraform
nnaka2992
0
260
学びを記事・スライド・Xへ高速展開する― AI-assisted Learning Loopで回すコンテンツ生成術
ochtum
0
210
例外からRich Errorsまで Kotlinエラーハンドリングの進化を読み解く
shiita0903
0
220
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
1
370
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
340
Kotlin JVM用に作られたライブラリのKMPを前提とした再設計
jsoizo
0
200
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
930
社内AIエージェント「Askワンバン」における コストチューニングの取り組み
t0yohei
0
170
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Facilitating Awesome Meetings
lara
57
7.2k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.2k
Designing for humans not robots
tammielis
254
26k
First, design no harm
axbom
PRO
2
1.4k
Scaling GitHub
holman
464
140k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.8k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
1
250
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
670
The Curious Case for Waylosing
cassininazir
1
610
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.8k