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
2.8k
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
2.6k
Komerco-コメルコ-を支える技術
starhoshi
4
5.7k
実践 Cloud Functions for Firebase
starhoshi
7
5.5k
個人アプリでレビューを高くするためにやっていること
starhoshi
2
1.6k
個人開発を加速させるツール群
starhoshi
54
21k
fastlane 勉強会
starhoshi
0
650
VIPER Architecture から学ぶ Dependency Injection
starhoshi
3
2k
学校の iOS 端末事情
starhoshi
0
2.1k
iOS が fastlane なら Android も fastlane に乗ってみては?
starhoshi
0
2.6k
Other Decks in Technology
See All in Technology
エムスリーマルチデバイスチーム紹介資料 / Introduction of M3 Multi Device Team
m3_engineering
0
150
【リラン】AIの光と闇?失敗しないために知っておきたいAIリスクとその対応 ①政府の動き編
tkhresk
0
130
kcp: Kubernetes APIs Are All You Need #techfeed_live / TechFeed Experts Night 28th
ytaka23
1
190
日本が誇るイタリアのダンスミュージック!? ユーロビートって何??
minorun365
PRO
1
180
SWC Transformerから見るTypeScript関数記述ベストプラクティス
fujiyamaorange
1
170
ハードウェアを動かすTypeScriptの世界
9wick
3
1.2k
Kaggleで学ぶ系列データのための深層学習モデリング
yu4u
7
1.7k
iThome2024 Wailing Wall of Enterprise Security
notsurprised
0
280
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
9
37k
RailsConf 2024 Keynote "Startups on Rails in 2024"
irinanazarova
0
770
Dungeons and Dragons and Rails
joelq
0
230
AWSの生成AI入門書を執筆しました🎉
minorun365
PRO
0
140
Featured
See All Featured
The Invisible Side of Design
smashingmag
294
49k
Web development in the modern age
philhawksworth
203
10k
Happy Clients
brianwarren
92
6.4k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
18
7k
Art, The Web, and Tiny UX
lynnandtonic
290
19k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.1k
A Modern Web Designer's Workflow
chriscoyier
689
190k
Building Applications with DynamoDB
mza
88
5.7k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
67
14k
Building a Scalable Design System with Sketch
lauravandoore
457
32k
Debugging Ruby Performance
tmm1
70
11k
From Idea to $5000 a Month in 5 Months
shpigford
377
45k
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 ͷਫ४Λ্͍͛ͯ͘
Ҏ্