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
3k
Do you know xctest command?
XCTest.frameworkじゃなくてxctestコマンド
xctestコマンドを直接叩いてCUIから任意のテストだけ実行するのにトライしてみた
tokorom
January 15, 2014
Tweet
Share
More Decks by tokorom
See All by tokorom
CursorでアプリをBuild/Lint
tokorom
0
160
続・SharePlayの歴史と進化 iOS18とApple Vision Proにおける新展開
tokorom
3
870
SharePlayの歴史と進化 そしてvisionOSへ (iOSDC 2023)
tokorom
3
1k
5分でSharePlay入門
tokorom
3
1.5k
HomeKit 2020
tokorom
7
2.5k
Advanced Segue 2019年のSegue事情
tokorom
9
6k
tvOSアプリUIの勘所
tokorom
1
2.1k
カッコ悪くリアクティブじゃダメですか?
tokorom
7
12k
古き良きsendAction (in potatotips #26)
tokorom
1
3.7k
Other Decks in Technology
See All in Technology
「伝える」を加速させるCursor術
naomix
0
640
生成AIをテストプロセスに活用し"よう"としている話 #jasstnano
makky_tyuyan
0
210
キャディでのApache Iceberg, Trino採用事例 -Apache Iceberg and Trino Usecase in CADDi--
caddi_eng
0
150
Grafana MCP serverでなんかし隊 / Try Grafana MCP server
kohbis
0
370
工具人的一生: 開發很多 AI 工具讓我 慵懶過一生
line_developers_tw
PRO
0
240
2025/6/21 日本学術会議公開シンポジウム発表資料
keisuke198619
2
410
Clineを含めたAIエージェントを 大規模組織に導入し、投資対効果を考える / Introducing AI agents into your organization
i35_267
2
450
比起獨自升級 我更喜歡 DevOps 文化 <3
line_developers_tw
PRO
0
250
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
49
29k
「どこにある?」の解決。生成AI(RAG)で効率化するガバメントクラウド運用
toru_kubota
2
450
CSS、JSをHTMLテンプレートにまとめるフロントエンド戦略
d120145
0
110
New Cache Hierarchy for Container Images and OCI Artifacts in Kubernetes Clusters using Containerd / KubeCon + CloudNativeCon Japan
pfn
PRO
0
170
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.8k
Writing Fast Ruby
sferik
628
61k
How to Ace a Technical Interview
jacobian
276
23k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
181
53k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.3k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
VelocityConf: Rendering Performance Case Studies
addyosmani
329
24k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Invisible Side of Design
smashingmag
299
51k
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