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
presentation.pdf
Search
Shingo Tamaki
July 24, 2018
Technology
2
730
presentation.pdf
WWDC 2018のWhat's New in Testingのダイジェスト版です。
Shingo Tamaki
July 24, 2018
Tweet
Share
More Decks by Shingo Tamaki
See All by Shingo Tamaki
沖縄モバイルアプリ開発勉強会#1
tamaki
0
82
iOSアプリ開発を始めよう
tamaki
0
120
詳解xcresult.pdf
tamaki
0
300
メルペイでのリグレッションテスト自動化推進のこれまでとこれから
tamaki
0
680
What do you want to test with UI Test v2
tamaki
2
840
JPQRによって変わる日本のQRコード決済
tamaki
0
240
What's New in Testing
tamaki
1
58
What do you want to test with UI Test
tamaki
5
1.8k
How to control state in UI Test
tamaki
4
2.5k
Other Decks in Technology
See All in Technology
The Rise of LLMOps
asei
7
1.7k
初心者向けAWS Securityの勉強会mini Security-JAWSを9ヶ月ぐらい実施してきての近況
cmusudakeisuke
0
130
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
130
Taming you application's environments
salaboy
0
190
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
390
EventHub Startup CTO of the year 2024 ピッチ資料
eventhub
0
120
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
230
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
190
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
3
630
AWS Lambda のトラブルシュートをしていて思うこと
kazzpapa3
2
180
TypeScriptの次なる大進化なるか!? 条件型を返り値とする関数の型推論
uhyo
2
1.7k
Featured
See All Featured
How to Ace a Technical Interview
jacobian
276
23k
Teambox: Starting and Learning
jrom
133
8.8k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
For a Future-Friendly Web
brad_frost
175
9.4k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
KATA
mclloyd
29
14k
Visualization
eitanlees
145
15k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
Side Projects
sachag
452
42k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Transcript
What's New in Testing
What's New in Testing 2018
ࣗݾհ ۄ৴ޛ iOS Engineer Appium
Agenda 1. Code Coverage 2. Test Selection and Order 3.
Parallel Testing
Code Coverage
Code CoverageʢXcode 9.3ʣ • ΧόϨοδදࣔ·Ͱͷ࣌ؒॖ • Xcode9ͱൺ95%ߴԽ • ΧόϨοδϑΝΠϧͷαΠζμϯ •
Xcode9ͱൺ1/10ҎԼ • C++ʹ͓͚ΔϔομϑΝΠϧʹهड़͞Ε࣮ͨͷΧόϨοδ ऩू͕Մೳʹ
Code CoverageʢXcode 9.3ʣ • λʔήοτͷબ • ΧόϨοδऩूͷରΛλʔήοτ୯ҐͰબՄೳ • ex) ϥΠϒϥϦͷαϯϓϧίʔυͷΧόϨοδͷใ
ཉ͘͠ͳ͍
xccov • ΧόϨοδσʔλΛѻ͏CLIπʔϧ • Coverage data • xccovreport: ֤λʔήοτɺιʔεϑΝΠϧɺ͓Αͼؔ ͷΧόϨοδͷׂ߹ͳͲؚ͕·ΕΔ
• xccovarchive: Ϩϙʔτͷ֤ϑΝΠϧͷੜͷ࣮ߦճ͕ ؚ·ΕΔ
xccov • xccov view hoge.xccovreport Name Coverage ---------------------------------------------------------------------------------- ------------- SampleLib.framework
100.00% (3/3) /Users/you/SampleLib/Classes/SampleLib.swift 100.00% (3/3) static SampleLib.SampleLib.foo() -> Swift.String 100.00% (3/3)
xccov • xccov view hoge.xccovreport --json | jq { "coveredLines":
3, "lineCoverage": 1, "targets": [ { "coveredLines": 3, "lineCoverage": 1, "files": [ { "coveredLines": 3, "lineCoverage": 1, "path": "/Users/you/SampleLib/Classes/SampleLib.swift", "functions": [ { "coveredLines": 3, "lineCoverage": 1, "lineNumber": 11, "executionCount": 1, "name": "static SampleLib.SampleLib.foo() -> Swift.String", "executableLines": 3 } ], "name": "SampleLib.swift", "executableLines": 3 } ], "name": "SampleLib.framework", "executableLines": 3, "buildProductPath": "/Users/you/Library/Developer/Xcode/DerivedData/.../SampleLib.framework/SampleLib" } ], "executableLines": 3 }
Test Selection and Order
Test Selection and Order • εΩʔϜຖʹλʔήοτͷςετΛࣗಈՃ͢Δ͔Ͳ͏͔બ ΔΑ͏ʹͳͬͨ • ςετͷ࣮ߦॱΛϥϯμϜʹग़དྷΔ༷ʹͳͬͨ •
࣮ߦॱংʹґଘͨ͠ςετΛݕग़͘͢͠ͳΔ • ґଘΛແ͘͠setup/teardownΛͬͯඞཁͳঢ়ଶ࡞Γ ·͠ΐ͏
Parallel Testing
!
Parallel Testing • ͜Ε·Ͱͷฒྻςετ • ෳͷγϛϡϨʔλͰશͯͷςετΛ࣮ߦ • xcodebuild͔ΒͷΈαϙʔτ͍ͯͨ͠
None
Parallel Distributed Testing • ಉҰγϛϡϨʔλͰͷςετͷฒྻ࣮ߦ͕Մೳʹͳͬͨ • Xcodeͱxcodebuildͷ྆ํͰߦ͑Δ • ςετΫϥε୯ҐͰࢄ͞ΕΔ •
ςετࢦఆͨ͠γϛϡϨʔλͷΫϩʔϯ͕ඞཁͳ͚ͩىಈ ࣮͠ߦ͞ΕΔ
None
Ҏ্
͓·͚
man xccov xccovͷ͍ํΛৄࡉʹΓ͍ͨ߹man xccovΛݟͨํ͕ྑ ͍ xccov helpxccov help viewͰදࣔ͞ΕΔใ؆ૉʹॻ͔Ε ͍ͯΔ
xcrunলུ͍ͨ͠ xcrunൈ͖Ͱxccovୟ͖͍ͨͳΒ /Applications/Xcode.app/Contents/Developer/usr/bin/ ʹύε௨͠·͠ΐ͏ simctlͳͲͷଞͷ։ൃऀπʔϧΛ͏ͷʹศརͰ͢ɻ
xcodebuild option ฒྻςετ༻ͷΦϓγϣϯ͕૿͑·ͨ͠ //ฒྻςετͷϫʔΧʔͷࢦఆ -parallel-testing-worker-count n //ฒྻςετͷ࣮ߦΦϓγϣϯ -parallel-testing-enabled YES |
NO
ࢀߟURL What's New in Testing https://developer.apple.com/videos/play/wwdc2018/403/ xccov: Xcode Code Coverage
Report for Humans https://medium.com/xcblog/xccov-xcode-code-coverage- report-for-humans-466a4865aa18