Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
iOS 開発での Pull Request と テストカバレッジの連携
Search
star__hoshi
March 13, 2017
Technology
3.7k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
iOS 開発での Pull Request と テストカバレッジの連携
iOS Test Night #3
https://testnight.connpass.com/event/49561/
star__hoshi
March 13, 2017
Transcript
31 slides
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 ͷਫ४Λ্͍͛ͯ͘
Ҏ্
More Decks by star__hoshi
See All by star__hoshi
大統一ロガーを利用したサービス開発
starhoshi
0
3.6k
Komerco-コメルコ-を支える技術
starhoshi
4
6.1k
実践 Cloud Functions for Firebase
starhoshi
7
6k
個人アプリでレビューを高くするためにやっていること
starhoshi
2
1.9k
個人開発を加速させるツール群
starhoshi
54
22k
fastlane 勉強会
starhoshi
0
880
VIPER Architecture から学ぶ Dependency Injection
starhoshi
3
2.4k
学校の iOS 端末事情
starhoshi
0
2.4k
iOS が fastlane なら Android も fastlane に乗ってみては?
starhoshi
0
3.1k
Other Decks in Technology
See All in Technology
「任されビリティ」で引き受けて「よしなりてぃ」に頼らず任せる / Accept tasks with "makasarebility" and hand them over without relying on "yoshinarily"
pauli
1
860
こんなに変わった! AWSネットワークの常識
shotashiratori
16
11k
Agent Routerで作るマルチテナント 推論基盤 #CNDW2026 / Building Multi-Tenant Inference Platform with Agent Router #CNDW2026
everpeace
4
510
gem install とrequire のむこうがわ
ydah
0
240
認知負荷の減らし方 ~開発にも日常業務にも活かせるノウハウ~
minorun365
PRO
12
8.3k
業務の傍らで進める改善ループエンジニアリング
bengo4com
1
220
異夢同船〜異なる夢でも同じ船でなんとかする〜
fortegp05
1
560
20261113_AWS Organizations運用を下支えするCFn StackSetsの柔軟性
dkduppf
0
110
Test Impact Analysis を武器に立ち向かう、AI 時代のテスト増加に対するヌーラボのアプローチ / getting-started-datadog-test-impact-analysis
k6s4i53rx
0
270
PHPで家庭用ゲーム機の専用コントローラーをMIDIデバイスとして扱ってみる
wind111
0
170
Gov-JAWS#9 統合監視機能のマネージドサービス化+AIによる障害時自動調査
fj_yoshimura_kosuke
0
220
認知の質も文化醸成も。数年取り組んで見えてきた技術広報のKPI設計 / Tech PR KPIs: Lessons on Awareness Quality and Culture After Several Years
bitkey
PRO
0
140
Featured
See All Featured
Designing Experiences People Love
moore
143
24k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
780
HDC tutorial
michielstock
2
1k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
23k
Building Applications with DynamoDB
mza
96
7.3k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
520
sira's awesome portfolio website redesign presentation
elsirapls
0
510
The SEO Collaboration Effect
kristinabergwall1
1
620
WCS-LA-2024
lcolladotor
0
1k
How to Think Like a Performance Engineer
csswizardry
28
2.9k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
310
Stop Working from a Prison Cell
hatefulcrawdad
274
21k