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
Xcode & fastlane で iOS アプリのスクショ撮影を自動化しよう!
Search
Tomoki Kobayashi
August 20, 2018
Technology
3
760
Xcode & fastlane で iOS アプリのスクショ撮影を自動化しよう!
Nagoya iOS meetup Vol.4 での発表資料です。
https://nagoya-ios-meetup.connpass.com/event/95974/
Tomoki Kobayashi
August 20, 2018
Tweet
Share
More Decks by Tomoki Kobayashi
See All by Tomoki Kobayashi
iOSパッケージマネージャー奮闘記 完結編
temoki
2
90
事業譲渡を受けたアプリとの統合で失敗、 そしてユーザーからの評価回復に至るまで
temoki
1
230
Apple Vision Proデベロッパラボに参加してきた
temoki
0
110
年末年始の成果、そして現状の紹介
temoki
0
51
Apple HIGのススメ
temoki
0
87
ChatGPTにSVGでお絵描きさせる
temoki
0
310
Figmaプラグイン開発のススメ
temoki
0
730
エンジニア is 何?🤔
temoki
0
150
Swift Package Manager によるマルチモジュール構成
temoki
3
1.2k
Other Decks in Technology
See All in Technology
Autopsy of a Cascading Outage from a MySQL Crashing Bug
jfg956
0
200
継続的テストモデルを実現するためにスリーアミーゴスを用いた10Xでのシフトレフトの事例
nihonbuson
3
160
Cloud Friendly(?) Jenkins. How we failed to make Jenkins cloud native and what we learned?
onenashev
PRO
0
110
なんで私に登壇依頼が?! ~頼られるエンジニアになるためには~ /
mixi_engineers
PRO
2
200
生成AIサービスPanorama AIご説明資料
sdt
0
300
実務への応用例から考える 変更に強いオブジェクト指向設計 / 20240324-ooc2024
bengo4com
7
5k
サービスメッシュ環境における OpenTelemetry 活用 / OpenTelemetry in Service Mesh
k6s4i53rx
2
830
LLMプロダクト事業の立ち上げにおける挑戦
layerx
PRO
7
1.4k
期待しすぎずに取り組む両面 TypeScript
shozawa
2
290
検証からプロダクトへ: シームレスなLLM開発の ためのしくみ作り
nunukim
1
150
SREsのためのSRE定着ガイド
netmarkjp
10
1.6k
戦略的DDDを実践するための跳躍力 / OOC 2024
pictiny
6
3.9k
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
644
57k
Keith and Marios Guide to Fast Websites
keithpitt
407
22k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
185
15k
Writing Fast Ruby
sferik
619
59k
Fantastic passwords and where to find them - at NoRuKo
philnash
35
2.4k
Building Better People: How to give real-time feedback that sticks.
wjessup
350
18k
Building Applications with DynamoDB
mza
88
5.6k
Large-scale JavaScript Application Architecture
addyosmani
501
110k
GraphQLの誤解/rethinking-graphql
sonatard
48
9.1k
Building Flexible Design Systems
yeseniaperezcruz
317
37k
Building a Scalable Design System with Sketch
lauravandoore
455
32k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
39
4.3k
Transcript
Xcode & fastlane iOS iOS meetup Nagoya
@temoki Fenrir Inc. / PL, iOS Engineer Mobile Act NAGOYA
/
VanApp Fenrir Van = Fenrir
Fenrir VanApp iOS https://vanapp.com/dokidokiglass
Swift (2015 ) ObjectiveC Swift4 iPhone X
1. UI 2. UI Accessibility Identifier 3. UI 4.
UI Xcode 7 UI Test Unit Test UI Test
Accessibility Identifier UI Storyboard Accessibility Identifier
class UITestsForScreenshot: XCTestCase { override func setUp() { super.setUp() }
override func tearDown() { super.tearDown() } func testForScreenshot() { // UI }
// let app = XCUIApplication() app.launch() // UI Accessibility Identifier
let glassButton = app.buttons["glass-button"].firstMatch let sensorButton = app.buttons["sensor-button"].firstMatch // glassButton.tap() sensorButton.tap()
// // let tap3Button = app.buttons["tap3_button"].firstMatch expectation(for: NSPredicate(format: "exists ==
true"), evaluatedWith: tap3Button, handler: nil) waitForExpectations(timeout: 30, handler: nil) // 10 for _ in 1...10 { tap3Button.tap() }
None
UI UI // let screenshot = XCUIScreen.main.screenshot() // let attachment
= XCTAttachment(screenshot: screenshot) attachment.lifetime = .keepAlways add(attachment)
Report Navigator
(1)
None
fastlane snapshot fastlane iOS/Android snapshot https://github.com/fastlane/fastlane
( ) 1. UI 2. UI Accessibility Identifier 3. UI
4. fastlane snapshot 5. UI Snapshot 6. fastlane snapshot
fastlane snapshot RubyGems fastlane Xcode snapshot Snapfile, SnapshotHelper.swift $ sudo
gem install fastlane --verbose $ fastlane snapshot init Snapfile # devices(["iPhone 8","iPhone 8 Plus","iPhone X","iPhone SE"]) # languages(["ja-jP"])
snapshot SnapshotHelper.swift UI let app = XCUIApplication() // snapshot setupSnapshot(app)
// ) snapshot("01_Connection ")
(2)
None
UI UI app.launchArguments.append("SCREENSHOT") ProcessInfo ProcessInfo.processInfo.arguments.contains("SCREENSHOT") UI
UI ( )
UIViewController view Accessibility Identifier otherElements view // .otherElements view let
view = app.otherElements["connection-view"].firstMatch // view expectation(for: NSPredicate(format: "exists == true"), evaluatedWith: element, handler: nil) waitForExpectations(timeout: 30, handler: nil)
$ fastlane snapshot ( + snapshot )
fastlane frameit (iPhone Plus) ( X )