Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Do you know xctest command?
tokorom
January 15, 2014
Technology
2
2.7k
Do you know xctest command?
XCTest.frameworkじゃなくてxctestコマンド
xctestコマンドを直接叩いてCUIから任意のテストだけ実行するのにトライしてみた
tokorom
January 15, 2014
Tweet
Share
More Decks by tokorom
See All by tokorom
5分でSharePlay入門
tokorom
2
760
HomeKit 2020
tokorom
7
1.8k
Advanced Segue 2019年のSegue事情
tokorom
10
4.7k
tvOSアプリUIの勘所
tokorom
1
1.3k
カッコ悪くリアクティブじゃダメですか?
tokorom
7
11k
古き良きsendAction (in potatotips #26)
tokorom
1
3.2k
画面遷移と私(iOS)
tokorom
4
3.4k
長生きするために心臓に悪いリリースはもうやめよう
tokorom
22
32k
potatotips#8 Swiftのライブラリを作成/利用しよう
tokorom
7
3.5k
Other Decks in Technology
See All in Technology
JJUG2022_spring_Keycloak (Red Hat Single Sign-on)
tinoue
0
200
音のような言葉 〜ちゃちゃっとチャットで楽しむちょっとしたコツ〜 / words like sounds
satoryu
1
1.3k
#JP_Stripes Sapporo Stripeの活用例を色々ご紹介します!
miu_crescent
0
110
SI企業が「アジャイル推し」になったら 幸せになれますか?/Can SI company be happy if it becomes “Agile stan” ?
chinmo
1
1.1k
2022年度新卒技術研修「DNS」講義
excitejp
PRO
0
360
複数のスクラムチームをサポートするエンジニアリングマネジメントの話
okeicalm
0
1k
What's new in Vision
satotakeshi
0
180
1人目SETとして入社して2ヶ月の間におこなったこと
tarappo
3
500
ノーメンテナンス運用実現のためのノウハウ/ColoplTech-05-02
colopl
0
160
チームとチームのチーム
eiel
1
910
越境チャレンジの現在地 〜Epic大臣制度の今〜
yousak
0
800
機械学習システムアーキテクチャ入門 #1
asei
3
1.2k
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
33
1.3k
Art Directing for the Web. Five minutes with CSS Template Areas
malarkey
196
9.4k
Streamline your AJAX requests with AmplifyJS and jQuery
dougneiner
126
8.5k
How New CSS Is Changing Everything About Graphic Design on the Web
jensimmons
213
11k
Imperfection Machines: The Place of Print at Facebook
scottboms
253
12k
Mobile First: as difficult as doing things right
swwweet
213
7.5k
Fontdeck: Realign not Redesign
paulrobertlloyd
73
4.1k
Put a Button on it: Removing Barriers to Going Fast.
kastner
56
2.3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
498
130k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
19
1.4k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
12
920
KATA
mclloyd
7
8.7k
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