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
star__hoshi
March 13, 2017
Technology
4
3.1k
iOS 開発での Pull Request と テストカバレッジの連携
iOS Test Night #3
https://testnight.connpass.com/event/49561/
star__hoshi
March 13, 2017
Tweet
Share
More Decks by star__hoshi
See All by star__hoshi
大統一ロガーを利用したサービス開発
starhoshi
0
3k
Komerco-コメルコ-を支える技術
starhoshi
4
5.9k
実践 Cloud Functions for Firebase
starhoshi
7
5.6k
個人アプリでレビューを高くするためにやっていること
starhoshi
2
1.7k
個人開発を加速させるツール群
starhoshi
54
22k
fastlane 勉強会
starhoshi
0
730
VIPER Architecture から学ぶ Dependency Injection
starhoshi
3
2.1k
学校の iOS 端末事情
starhoshi
0
2.2k
iOS が fastlane なら Android も fastlane に乗ってみては?
starhoshi
0
2.8k
Other Decks in Technology
See All in Technology
「隙間家具OSS」に至る道/Fujiwara Tech Conference 2025
fujiwara3
7
6.5k
Docker Desktop で Docker を始めよう
zembutsu
PRO
0
170
Azureの開発で辛いところ
re3turn
0
240
データ基盤におけるIaCの重要性とその運用
mtpooh
4
530
DMMブックスへのTipKit導入
ttyi2
1
110
機械学習を「社会実装」するということ 2025年版 / Social Implementation of Machine Learning 2025 Version
moepy_stats
5
1.2k
デジタルアイデンティティ技術 認可・ID連携・認証 応用 / 20250114-OIDF-J-EduWG-TechSWG
oidfj
2
680
2025年の挑戦 コーポレートエンジニアの技術広報/techpr5
nishiuma
0
140
Visual StudioとかIDE関連小ネタ話
kosmosebi
1
380
Formal Development of Operating Systems in Rust
riru
1
420
re:Invent2024 KeynoteのAmazon Q Developer考察
yusukeshimizu
1
150
シフトライトなテスト活動を適切に行うことで、無理な開発をせず、過剰にテストせず、顧客をビックリさせないプロダクトを作り上げているお話 #RSGT2025 / Shift Right
nihonbuson
3
2.2k
Featured
See All Featured
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
500
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
360
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
Into the Great Unknown - MozCon
thekraken
34
1.6k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
How STYLIGHT went responsive
nonsquared
96
5.3k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
The Cost Of JavaScript in 2023
addyosmani
46
7.2k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.5k
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 ͷਫ४Λ্͍͛ͯ͘
Ҏ্