Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
iOS ։ൃͰͷ Pull Request ͱ ςετΧόϨοδͷ࿈ܞ iOS Test Night #3 by @star__hoshi
Slide 2
Slide 2 text
ΞδΣϯμ • ࣗݾհ • ςετΧόϨοδܭଌ • ϓϧϦΫͱͷ࿈ܞ • ͓·͚
Slide 3
Slide 3 text
ࣗݾհ • Twitter: @star__hoshi • GitHub: starhoshi • Classiגࣜձࣾ • iOS ΤϯδχΞ
Slide 4
Slide 4 text
ΧόϨοδͬͯʁ ϝϦοτʁσϝϦοτʁ ΧόϨοδΛຬͨ͢ͱ্࣭͕͕Δͷʁ ΧόϨοδϙϦεϝϯ
Slide 5
Slide 5 text
ͱ͍͏͠·ͤΜ ͳͥͳΒ5͔͠ͳ͍͔Β
Slide 6
Slide 6 text
࣮ࡍʹܭଌ͢Δ ͱ͍͏Λ͠·͢
Slide 7
Slide 7 text
ܥ
Slide 8
Slide 8 text
Xcode ʹ͓͚Δ ΧόϨοδܭଌํ๏
Slide 9
Slide 9 text
Xcode: EditScheme > XxxTests Gather coverage data ʹνΣοΫೖΕΔ
Slide 10
Slide 10 text
͜Μͳײ͡Ͱ݁Ռ͕ग़Δ
Slide 11
Slide 11 text
ϩʔΧϧͰܭଌͰ͖Δ ͕ ϓϧϦΫʹ࿈ܞ͍ͨ͠
Slide 12
Slide 12 text
fastlane scan + fastlane action
Slide 13
Slide 13 text
fastlane scan ؆୯ʹςετΛ࣮ߦ (ઃఆϑΝΠϧඞཁ) IUUQTHJUIVCDPNGBTUMBOFGBTUMBOFUSFFNBTUFSTDBO
Slide 14
Slide 14 text
fastlane action | grep coverage • lcov • xcov • gcovr • slather
Slide 15
Slide 15 text
fastlane action | grep coverage • lcov • xcov • gcovr • slather
Slide 16
Slide 16 text
nakiostudio/xcov IUUQTHJUIVCDPNOBLJPTUVEJPYDPW
Slide 17
Slide 17 text
nakiostudio/danger-xcov IUUQTHJUIVCDPNOBLJPTUVEJPEBOHFSYDPW
Slide 18
Slide 18 text
danger IUUQEBOHFSTZTUFNT ϓϧϦΫʹ merge OK ͔νΣοΫͰ͖Δ
Slide 19
Slide 19 text
IUUQOJXBUBLPIBUFOBCMPHKQFOUSZ
Slide 20
Slide 20 text
fastlane scan + danger-xcov + CI Server
Slide 21
Slide 21 text
gem 'fastlane' gem 'danger-xcov' gem 'danger' Gemfile
Slide 22
Slide 22 text
scheme "HogeTests" configuration "Staging" device "iPad Retina" workspace "hoge.xcworkspace" clean true skip_build true fastlane/Scanfile
Slide 23
Slide 23 text
xcov.report( workspace:"hoge.xcworkspace", scheme:"HogeTests", minimum_coverage_percentage:40 ) Dangerfile minimum_coverage_percentage ΛԼճΔͱ Merge Ͱ͖ͳ͍
Slide 24
Slide 24 text
lane :test do scan danger end fastlane/Fastfile
Slide 25
Slide 25 text
test: override: - bundle exec fastlane test CI Ͱ࣮ߦ CircleCI Ͱͷྫ:
Slide 26
Slide 26 text
DANGER_GITHUB_API_TOKEN https://github.com/settings/tokens/new ͰAPIτʔΫϯΛऔಘɺCI Ͱઃఆ
Slide 27
Slide 27 text
݁Ռ
Slide 28
Slide 28 text
͍͍͜ͱ • 100% ΛݟΔͱॆ࣮ײ͕͋Δ • ͬͱΔͧ • ✅ ϨϏϡϫʔͷෛ୲ݮ • ςετॻ͍ͯͳ͍ͷ͕ҰॠͰόϨΔ • ݾͷະख़͞Λײ͡Δ ( 43%)
Slide 29
Slide 29 text
͓·͚
Slide 30
Slide 30 text
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 ͷਫ४Λ্͍͛ͯ͘
Slide 31
Slide 31 text
Ҏ্