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
Do you know xctest command?
Search
tokorom
January 15, 2014
Technology
2
2.9k
Do you know xctest command?
XCTest.frameworkじゃなくてxctestコマンド
xctestコマンドを直接叩いてCUIから任意のテストだけ実行するのにトライしてみた
tokorom
January 15, 2014
Tweet
Share
More Decks by tokorom
See All by tokorom
SharePlayの歴史と進化 そしてvisionOSへ (iOSDC 2023)
tokorom
2
780
5分でSharePlay入門
tokorom
2
1.4k
HomeKit 2020
tokorom
7
2.3k
Advanced Segue 2019年のSegue事情
tokorom
9
5.7k
tvOSアプリUIの勘所
tokorom
1
1.9k
カッコ悪くリアクティブじゃダメですか?
tokorom
7
12k
古き良きsendAction (in potatotips #26)
tokorom
1
3.5k
画面遷移と私(iOS)
tokorom
4
3.6k
長生きするために心臓に悪いリリースはもうやめよう
tokorom
21
33k
Other Decks in Technology
See All in Technology
OSSコミットしてZennの課題を解決した話
dyoshikawa1993
0
150
LINE WORKSへ簡単通知!Incoming Webhookアプリの紹介
mmclsntr
0
110
シフトレフトで挑む セキュリティの生産性向上
sekido
PRO
0
270
Azure Pipelinesを使用したCICDベースラインアーキテクチャ実践
yuriemori
0
190
AOAI Dev Day - Opening Session
yoshidashingo
2
440
20240724_cm_odyssey_hibiyatech
hiashisan
0
110
コミュニティサービスに「あなたへ」フィードを リリースするまでの試行錯誤
takapy
1
150
楽しくGoを学び合う、LayerXの勉強会文化 / LayerX's study culture of having fun and learning Go together
ar_tama
2
350
公共領域から学ぶ クラウド移行についてエンジニアが意識していること
kawakawa2222
0
140
JBUG岡山 #6 WordCamp男木島の チームビルディング
takeshifurusato
0
150
目標設定は好きですか? アジャイルとともに目標と向き合い続ける方法 / Do you like target Management?
kakehashi
10
3k
エンジニア向け会社紹介資料
caddi_eng
14
220k
Featured
See All Featured
Statistics for Hackers
jakevdp
792
220k
How To Stay Up To Date on Web Technology
chriscoyier
784
250k
Writing Fast Ruby
sferik
623
60k
GitHub's CSS Performance
jonrohan
1026
450k
Making Projects Easy
brettharned
111
5.7k
Rebuilding a faster, lazier Slack
samanthasiow
78
8.5k
Web development in the modern age
philhawksworth
203
10k
How GitHub Uses GitHub to Build GitHub
holman
471
290k
Infographics Made Easy
chrislema
238
18k
The Art of Programming - Codeland 2020
erikaheidi
48
13k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
121
18k
From Idea to $5000 a Month in 5 Months
shpigford
377
46k
Transcript
xctestίϚϯυͬͯ ͍ͬͯ·͔͢ʁ ॴ ༑ଠ @tokorom iOS App Programer These are
“not” confidential sessions—please diffuse by your blogging and twitter potatotips #3
༧ • XCTestϑϨʔϜϫʔΫ͍ͬͯΔ • xctestίϚϯυͳΜͯ͋Δͷʁ
Xcode 5 ʹͳͬͯ • xcodebuildίϚϯυ͕ઈύϫʔΞοϓʂ • XcodeͰಛఆͷςετέʔε͚ͩΛୟ͘ͷ͕؆ ୯ʹͳͬͨ
Ͱ • xcodebuildίϚϯυʹಛఆͷςετΛࢦఆ͢Δ ޱ͕ͳ͍ • ී௨ʹCUI͔ΒಛఆͷςετΛ࣮ߦ͢Δํ๏ ͕ͳ͍ʂʂ
xctestίϚϯυͱʁ • xcodebuild test ෦తʹ xctest ίϚϯυΛୟ ͍͍ͯΔ •xctest -XCTest
SampleTests/testSample Ͱ࣮ߦ͢ Δςετέʔε͕ࢦఆͰ͖Δ
ͨͩ͠… • xctestίϚϯυΛTerminalͰୟ͍࣮ͯߦ͢ Δͱ͔ৗਓʹ΄΅ෆՄೳ •΅͘ xctest Λୟ͍ͯςετ࣮ߦ͢Δͷʹ ؙ͔͔̎ؒͬͨ
น1: ͲͷxctestΛୟ͘ͷʁ
xctest͍͔ͭ͋͘Δ $ pwd /Applications/Xcode.app ! $ find . -name xctest
./Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/ iPhoneSimulator7.0.sdk/Developer/usr/bin/xctest ! ./Contents/Developer/usr/bin/xctest Xcode͔ΒͩͱϏϧυͨ͠όΠφϦʹ߹Θͤͯదͳ ͕ͭΘΕ͍ͯΔͬΆ͍
น2: ϏϧυઃఆͷҾ͖ܧ͗
xcodebuild -showBuildSettings • ͜ΕͰϏϧυઃఆΛ֬ೝ͍ͯ͠Ζ͍Ζมߋ͠ ͳ͍ͱμϝ •build settings xcodebuildʹ͢ଞͷΦϓγϣ ϯʹΑͬͯมΘΔͷͰҙʂʂ
น3: ڥมͷઃఆ
NSProcessInfo • NSProcessInfoΛͬͯςετ࣮ߦ࣌ʹઃఆ͞ Ε͍ͯΔڥมͱ͔ίϚϯυͷҾͱ͔͕ ͔Δ •͜Εbuild settings ͷ༰ʹΑͬͯదʹઃఆ ͢Δඞཁ͕͋Δ
ཁ͢Δʹී௨ʹୟ͘ͷແཧ
ͳͷͰϥΠϒϥϦԽ͠·ͨ͠ʂ
xctest-runner
xctest-runner $ gem install xctest-runner ! $ xctest-runner ! $
xctest-runner -test SampleTests/testSample
xctest-runner $ xctest-runner -scheme Tests ! $ xctest-runner -project Sample.xcodeproj
-target Tests
(Vimͱ͔emacs͔Βฤूதͷςετ ͚࣮ͩߦͱ͔Ͱ͖ΔΑ͏ʹͳΔʂʣ
None
More Information Yuta ToKoRo! iOS App Programer! @tokorom! ! http://www.tokoro.me/
https://github.com/tokorom/xctest-runner