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
290
メルペイでのリグレッションテスト自動化推進のこれまでとこれから
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
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
120
DMARC 対応の話 - MIXI CTO オフィスアワー #04
bbqallstars
1
160
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
Terraform CI/CD パイプラインにおける AWS CodeCommit の代替手段
hiyanger
1
240
個人でもIAM Identity Centerを使おう!(アクセス管理編)
ryder472
3
200
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
7
790
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
フルカイテン株式会社 採用資料
fullkaiten
0
40k
第1回 国土交通省 データコンペ参加者向け勉強会③- Snowflake x estie編 -
estie
0
130
Can We Measure Developer Productivity?
ewolff
1
150
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
940
Lambdaと地方とコミュニティ
miu_crescent
2
370
Featured
See All Featured
Ruby is Unlike a Banana
tanoku
97
11k
Navigating Team Friction
lara
183
14k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
120
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Music & Morning Musume
bryan
46
6.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
Adopting Sorbet at Scale
ufuk
73
9.1k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
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