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
続・SharePlayの歴史と進化 iOS18とApple Vision Proにおける新展開
tokorom
3
690
SharePlayの歴史と進化 そしてvisionOSへ (iOSDC 2023)
tokorom
3
930
5分でSharePlay入門
tokorom
3
1.5k
HomeKit 2020
tokorom
7
2.5k
Advanced Segue 2019年のSegue事情
tokorom
9
5.9k
tvOSアプリUIの勘所
tokorom
1
2k
カッコ悪くリアクティブじゃダメですか?
tokorom
7
12k
古き良きsendAction (in potatotips #26)
tokorom
1
3.6k
画面遷移と私(iOS)
tokorom
4
3.7k
Other Decks in Technology
See All in Technology
Nekko Cloud、 これまでとこれから ~学生サークルが作る、 小さなクラウド
logica0419
2
730
リアルタイム分析データベースで実現する SQLベースのオブザーバビリティ
mikimatsumoto
0
950
Postmanを使いこなす!2025年ぜひとも押さえておきたいPostmanの10の機能
nagix
2
120
君も受託系GISエンジニアにならないか
sudataka
1
370
開発スピードは上がっている…品質はどうする? スピードと品質を両立させるためのプロダクト開発の進め方とは #DevSumi #DevSumiB / Agile And Quality
nihonbuson
1
1.3k
20250208_OpenAIDeepResearchがやばいという話
doradora09
PRO
0
170
明日からできる!技術的負債の返済を加速するための実践ガイド~『ホットペッパービューティー』の事例をもとに~
recruitengineers
PRO
3
100
Datadog APM におけるトレース収集の流れ及び Retention Filters のはなし / datadog-apm-trace-retention-filters
k6s4i53rx
0
320
5分で紹介する生成AIエージェントとAmazon Bedrock Agents / 5-minutes introduction to generative AI agents and Amazon Bedrock Agents
hideakiaoyagi
0
220
10分で紹介するAmazon Bedrock利用時のセキュリティ対策 / 10-minutes introduction to security measures when using Amazon Bedrock
hideakiaoyagi
0
170
まだ間に合う! エンジニアのための生成AIアプリ開発入門 on AWS
minorun365
PRO
4
580
開発者が自律的に AWS Security Hub findings に 対応する仕組みと AWS re:Invent 2024 登壇体験談 / Developers autonomously report AWS Security Hub findings Corresponding mechanism and AWS re:Invent 2024 presentation experience
kaminashi
0
190
Featured
See All Featured
RailsConf 2023
tenderlove
29
1k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.4k
Docker and Python
trallard
44
3.3k
Building an army of robots
kneath
302
45k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.6k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.4k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
400
The Pragmatic Product Professional
lauravandoore
32
6.4k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
Practical Orchestrator
shlominoach
186
10k
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