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
VPC間の接続方法を整理してみた #自治体クラウド勉強会
non97
1
810
顧客が本当に必要だったもの - パフォーマンス改善編 / Make what is needed
soudai
24
6.7k
Gradle: The Build System That Loves To Hate You
aurimas
2
140
Vueで Webコンポーネントを作って Reactで使う / 20241030-cloudsign-vuefes_after_night
bengo4com
4
2.5k
来年もre:Invent2024 に行きたいあなたへ - “集中”と“つながり”で楽しむ -
ny7760
0
460
新卒1年目が挑む!生成AI × マルチエージェントで実現する次世代オンボーディング / operation-ai-onboarding
cyberagentdevelopers
PRO
1
160
30万人が利用するチャットをFirebase Realtime DatabaseからActionCableへ移行する方法
ryosk7
5
330
よくわからんサービスについての問い合わせが来たときの強い味方 Amazon Q について
kazzpapa3
0
220
独自ツール開発でスタジオ撮影をDX!「VLS(Virtual LED Studio)」 / dx-studio-vls
cyberagentdevelopers
PRO
1
170
APIテスト自動化の勘所
yokawasa
7
4.1k
AWSコンテナ本出版から3年経った今、もし改めて執筆し直すなら / If I revise our container book
iselegant
15
3.9k
「最高のチューニング」をしないために / hack@delta 24.10
fujiwara3
21
3.4k
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
519
39k
Visualization
eitanlees
144
15k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
A designer walks into a library…
pauljervisheath
202
24k
GraphQLとの向き合い方2022年版
quramy
43
13k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
231
17k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Documentation Writing (for coders)
carmenintech
65
4.4k
KATA
mclloyd
29
13k
Building Applications with DynamoDB
mza
90
6.1k
Agile that works and the tools we love
rasmusluckow
327
21k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
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