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
740
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
88
iOSアプリ開発を始めよう
tamaki
0
130
詳解xcresult.pdf
tamaki
0
310
メルペイでのリグレッションテスト自動化推進のこれまでとこれから
tamaki
0
690
What do you want to test with UI Test v2
tamaki
2
850
JPQRによって変わる日本のQRコード決済
tamaki
0
250
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.6k
Other Decks in Technology
See All in Technology
PHPからGoへのマイグレーション for DMMアフィリエイト
yabakokobayashi
1
160
宇宙ベンチャーにおける最近の情シス取り組みについて
axelmizu
0
110
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
540
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
2
260
私なりのAIのご紹介 [2024年版]
qt_luigi
1
120
ハイテク休憩
sat
PRO
2
140
re:Invent をおうちで楽しんでみた ~CloudWatch のオブザーバビリティ機能がスゴい!/ Enjoyed AWS re:Invent from Home and CloudWatch Observability Feature is Amazing!
yuj1osm
0
120
Amazon SageMaker Unified Studio(Preview)、Lakehouse と Amazon S3 Tables
ishikawa_satoru
0
150
KubeCon NA 2024 Recap: How to Move from Ingress to Gateway API with Minimal Hassle
ysakotch
0
200
kargoの魅力について伝える
magisystem0408
0
200
フロントエンド設計にモブ設計を導入してみた / 20241212_cloudsign_TechFrontMeetup
bengo4com
0
1.9k
サービスでLLMを採用したばっかりに振り回され続けたこの一年のあれやこれや
segavvy
2
380
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Writing Fast Ruby
sferik
628
61k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
A better future with KSS
kneath
238
17k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Producing Creativity
orderedlist
PRO
341
39k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
4 Signs Your Business is Dying
shpigford
181
21k
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