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
79
iOSアプリ開発を始めよう
tamaki
0
120
詳解xcresult.pdf
tamaki
0
290
メルペイでのリグレッションテスト自動化推進のこれまでとこれから
tamaki
0
670
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
CyberAgent 生成AI Deep Dive with Amazon Web Services / genai-aws
cyberagentdevelopers
PRO
1
480
APIテスト自動化の勘所
yokawasa
7
4.1k
事業者間調整の行間を読む 調整の具体事例
sugiim
0
1.3k
MAMを軸とした動画ハンドリングにおけるAI活用前提の整備と次世代ビジョン / abema-ai-mam
cyberagentdevelopers
PRO
1
110
オニオンアーキテクチャで実現した 本質課題を解決する インフラ移行の実例
hryushm
14
3k
ユーザーの購買行動モデリングとその分析 / dsc-purchase-analysis
cyberagentdevelopers
PRO
2
100
ネット広告に未来はあるか?「3rd Party Cookie廃止とPrivacy Sandboxの効果検証の裏側」 / third-party-cookie-privacy
cyberagentdevelopers
PRO
1
130
신뢰할 수 있는 AI 검색 엔진을 만들기 위한 Liner의 여정
huffon
0
300
生成AIの強みと弱みを理解して、生成AIがもたらすパワーをプロダクトの価値へ繋げるために実践したこと / advance-ai-generating
cyberagentdevelopers
PRO
1
180
グローバル展開を見据えたサービスにおける機械翻訳プラクティス / dp-ai-translating
cyberagentdevelopers
PRO
1
150
生成AIとAWS CDKで実現! 自社ブログレビューの効率化
ymae
2
330
オーティファイ会社紹介資料 / Autify Company Deck
autifyhq
9
120k
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
66
9.9k
Visualization
eitanlees
144
15k
Agile that works and the tools we love
rasmusluckow
327
21k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
790
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
3
370
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
355
29k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
231
17k
YesSQL, Process and Tooling at Scale
rocio
167
14k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Documentation Writing (for coders)
carmenintech
65
4.4k
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