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
1.9k
Xcode shortcuts
realm
0
4.6k
Self Branding with GitHub
realm
0
4.2k
Realm Mobile Platform overview and demo
realm
0
1.9k
Realm advanced topics and demo
realm
0
1.9k
Realm introduction Seoul meetup 10
realm
0
2k
Stuart Hall: How I got 2.3 Million App Downloads
realm
0
1.7k
James Majors: What the Swiftly Func?
realm
1
4.1k
Simina Pasat: Continuous everything for iOS apps
realm
0
560
Other Decks in Technology
See All in Technology
ワールドカフェI /チューターを改良する / World Café I and Improving the Tutors
ks91
PRO
0
120
いつか使うかも貯金してたらめちゃめちゃ機能が増えてた話
riyaamemiya
0
210
障害対応をちょっとずつよくしていくための 演習の作りかた
heleeen
0
230
ゼロから始めるVue.jsコミュニティ貢献 / first-vuejs-community-contribution-link-and-motivation
lmi
1
130
Postman v10リリース後を振り返る / Looking back at Postman v10 after release
yokawasa
1
160
検証を通して見えてきたTiDBの性能特性
lycorptech_jp
PRO
6
3.8k
Google Cloud Next '24 Recap(Cloud Run/k8s)
mokocm
0
230
Azureの基本的な権限管理の勉強会
yhana
0
560
KubeCon EU 2024 Recap “Kubernetes Policy Time Machine: Where to Next?”
ryysud
0
220
サーバー間 GraphQL と webmock-graphql の話 / server-to-server graphql and webmock-graphql
qsona
2
190
リテール金融(キャッシュレス・ネット銀行・ネット証券)の競争環境と経済圏
8maki
0
1.2k
データベース02: データベースの概念
trycycle
0
160
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1356
200k
Fashionably flexible responsive web design (full day workshop)
malarkey
398
65k
How STYLIGHT went responsive
nonsquared
92
4.8k
From Idea to $5000 a Month in 5 Months
shpigford
377
45k
The Art of Programming - Codeland 2020
erikaheidi
42
12k
Why Our Code Smells
bkeepers
PRO
331
56k
Side Projects
sachag
451
41k
Design by the Numbers
sachag
274
18k
The Cult of Friendly URLs
andyhume
74
5.7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
19
1.7k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
187
16k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
60
14k
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