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
Luis Ascorbe: UI and Snapshottesting
Search
Realm
July 08, 2016
Technology
0
7k
Luis Ascorbe: UI and Snapshottesting
Realm
July 08, 2016
Tweet
Share
More Decks by Realm
See All by Realm
WWDC 2017 Review
realm
0
2.1k
Xcode shortcuts
realm
0
4.7k
Self Branding with GitHub
realm
0
4.3k
Realm Mobile Platform overview and demo
realm
0
2.1k
Realm advanced topics and demo
realm
0
2k
Realm introduction Seoul meetup 10
realm
0
2.1k
Stuart Hall: How I got 2.3 Million App Downloads
realm
0
1.9k
James Majors: What the Swiftly Func?
realm
1
4.3k
Simina Pasat: Continuous everything for iOS apps
realm
0
630
Other Decks in Technology
See All in Technology
Introduction to Sansan Meishi Maker Development Engineer
sansan33
PRO
0
310
ガバメントクラウドの概要と自治体事例(名古屋市)
techniczna
3
240
新規事業におけるGORM+SQLx併用アーキテクチャ
hacomono
PRO
0
300
Introduction to Bill One Development Engineer
sansan33
PRO
0
300
AWS Top Engineer、浮いてませんか? / As an AWS Top Engineer, Are You Out of Place?
yuj1osm
2
210
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.2k
能登半島災害現場エンジニアクロストーク 【JAWS FESTA 2025 in 金沢】
ditccsugii
0
850
ユーザーの声とAI検証で進める、プロダクトディスカバリー
sansantech
PRO
1
140
AgentCon Accra: Ctrl + Alt + Assist: AI Agents Edition
bethany
0
110
データ戦略部門 紹介資料
sansan33
PRO
1
3.7k
WEBサービスを成り立たせるAWSサービス
takano0131
1
160
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
8.8k
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.6k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Into the Great Unknown - MozCon
thekraken
40
2.1k
How to train your dragon (web standard)
notwaldorf
97
6.3k
Gamification - CAS2011
davidbonilla
81
5.5k
Facilitating Awesome Meetings
lara
56
6.6k
The Power of CSS Pseudo Elements
geoffreycrofte
79
6k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
30
2.9k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
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