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
iOS 開発での Pull Request と テストカバレッジの連携
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
star__hoshi
March 13, 2017
Technology
3.4k
4
Share
iOS 開発での Pull Request と テストカバレッジの連携
iOS Test Night #3
https://testnight.connpass.com/event/49561/
star__hoshi
March 13, 2017
More Decks by star__hoshi
See All by star__hoshi
大統一ロガーを利用したサービス開発
starhoshi
0
3.3k
Komerco-コメルコ-を支える技術
starhoshi
4
6k
実践 Cloud Functions for Firebase
starhoshi
7
5.9k
個人アプリでレビューを高くするためにやっていること
starhoshi
2
1.8k
個人開発を加速させるツール群
starhoshi
54
22k
fastlane 勉強会
starhoshi
0
860
VIPER Architecture から学ぶ Dependency Injection
starhoshi
3
2.2k
学校の iOS 端末事情
starhoshi
0
2.4k
iOS が fastlane なら Android も fastlane に乗ってみては?
starhoshi
0
2.9k
Other Decks in Technology
See All in Technology
マルチモーダル非構造データとの闘い
shibuiwilliam
1
140
OCI技術資料 : ロード・バランサ 概要 - FLB・NLB共通
ocise
4
27k
非同期・イベント駆動処理の分散トレーシングの繋げ方
ichikawaken
1
250
制約を設計する - 非決定性との境界線 / Designing constraints
soudai
PRO
4
840
Sansanの認証基盤を支えるアーキテクチャとその振り返り
sansantech
PRO
1
150
会社紹介資料 / Sansan Company Profile
sansan33
PRO
16
410k
脳が溶けた話 / Melted Brain
keisuke69
1
1.2k
「できない」のアウトプット 同人誌『精神を壊してからの』シリーズ出版を 通して得られたこと
comi190327
3
520
「活動」は激変する。「ベース」は変わらない ~ 4つの軸で捉える_AI時代ソフトウェア開発マネジメント
sentokun
0
140
40代からのアウトプット ― 経験は価値ある学びに変わる / 20260404 Naoki Takahashi
shift_evolve
PRO
4
720
OpenClawでPM業務を自動化
knishioka
2
370
Oracle Cloud Infrastructure:2026年3月度サービス・アップデート
oracle4engineer
PRO
0
320
Featured
See All Featured
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.5k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Rails Girls Zürich Keynote
gr2m
96
14k
Code Reviewing Like a Champion
maltzj
528
40k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.2k
BBQ
matthewcrist
89
10k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
120
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Transcript
iOS ։ൃͰͷ Pull Request ͱ ςετΧόϨοδͷ࿈ܞ iOS Test Night #3
by @star__hoshi
ΞδΣϯμ • ࣗݾհ • ςετΧόϨοδܭଌ • ϓϧϦΫͱͷ࿈ܞ • ͓·͚
ࣗݾհ • Twitter: @star__hoshi • GitHub: starhoshi • Classiגࣜձࣾ •
iOS ΤϯδχΞ
ΧόϨοδͬͯʁ ϝϦοτʁσϝϦοτʁ ΧόϨοδΛຬͨ͢ͱ্࣭͕͕Δͷʁ ΧόϨοδϙϦεϝϯ
ͱ͍͏͠·ͤΜ ͳͥͳΒ5͔͠ͳ͍͔Β
࣮ࡍʹܭଌ͢Δ ͱ͍͏Λ͠·͢
ܥ
Xcode ʹ͓͚Δ ΧόϨοδܭଌํ๏
Xcode: EditScheme > XxxTests Gather coverage data ʹνΣοΫೖΕΔ
͜Μͳײ͡Ͱ݁Ռ͕ग़Δ
ϩʔΧϧͰܭଌͰ͖Δ ͕ ϓϧϦΫʹ࿈ܞ͍ͨ͠
fastlane scan + fastlane action
fastlane scan ؆୯ʹςετΛ࣮ߦ (ઃఆϑΝΠϧඞཁ) IUUQTHJUIVCDPNGBTUMBOFGBTUMBOFUSFFNBTUFSTDBO
fastlane action | grep coverage • lcov • xcov •
gcovr • slather
fastlane action | grep coverage • lcov • xcov •
gcovr • slather
nakiostudio/xcov IUUQTHJUIVCDPNOBLJPTUVEJPYDPW
nakiostudio/danger-xcov IUUQTHJUIVCDPNOBLJPTUVEJPEBOHFSYDPW
danger IUUQEBOHFSTZTUFNT ϓϧϦΫʹ merge OK ͔νΣοΫͰ͖Δ
IUUQOJXBUBLPIBUFOBCMPHKQFOUSZ
fastlane scan + danger-xcov + CI Server
gem 'fastlane' gem 'danger-xcov' gem 'danger' Gemfile
scheme "HogeTests" configuration "Staging" device "iPad Retina" workspace "hoge.xcworkspace" clean
true skip_build true fastlane/Scanfile
xcov.report( workspace:"hoge.xcworkspace", scheme:"HogeTests", minimum_coverage_percentage:40 ) Dangerfile minimum_coverage_percentage ΛԼճΔͱ Merge Ͱ͖ͳ͍
lane :test do scan danger end fastlane/Fastfile
test: override: - bundle exec fastlane test CI Ͱ࣮ߦ CircleCI
Ͱͷྫ:
DANGER_GITHUB_API_TOKEN https://github.com/settings/tokens/new ͰAPIτʔΫϯΛऔಘɺCI Ͱઃఆ
݁Ռ
͍͍͜ͱ • 100% ΛݟΔͱॆ࣮ײ͕͋Δ • ͬͱΔͧ • ✅ ϨϏϡϫʔͷෛ୲ݮ •
ςετॻ͍ͯͳ͍ͷ͕ҰॠͰόϨΔ • ݾͷະख़͞Λײ͡Δ ( 43%)
͓·͚
require 'date' max = 90 diff = Date.today - Date.new(2017,3,13)
min = max > diff ? diff : max xcov.report( workspace: 'workspace', scheme: 'scheme', minimum_coverage_percentage: min) 90ޙʹ90%Λ࣮ݱ͢Δํ๏ ຖ1%ͣͭ Merge ͷਫ४Λ্͍͛ͯ͘
Ҏ্