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
650
5分でSharePlay入門
tokorom
2
1.3k
HomeKit 2020
tokorom
7
2.3k
Advanced Segue 2019年のSegue事情
tokorom
9
5.4k
tvOSアプリUIの勘所
tokorom
1
1.8k
カッコ悪くリアクティブじゃダメですか?
tokorom
7
12k
古き良きsendAction (in potatotips #26)
tokorom
1
3.5k
画面遷移と私(iOS)
tokorom
4
3.6k
長生きするために心臓に悪いリリースはもうやめよう
tokorom
22
33k
Other Decks in Technology
See All in Technology
Aurora MySQL v3(MySQL8.0互換)の オンラインDDLの罠挙動を全バージョンで検証した
yutakikai
1
150
オーナーシップを持つ領域を明確にする
konifar
11
2.4k
元インフラエンジニアに成る / Human Resources to Human Relations
bobtani
3
780
小さな開発会社がWebサービスを作る理由
polidog
PRO
1
160
プロトタイピングによる不確実性の低減 / Reducing Uncertainty through Prototyping
ohbarye
3
230
HEXA OSINT CTF V3 作戦会議
meow_noisy
0
110
社内勉強会運営のコツ
senoo
6
1.1k
DevOpsDays History and my DevOps story
kawaguti
PRO
8
1.6k
0→1開発における技術選定において一番大切なこと
bicstone
1
320
転移学習とドメイン適応の基礎
kmatsui
2
570
疲弊しない!AWSセキュリティ統制の考え方 #devio_osakaday1
masahirokawahara
6
5.9k
インシデントレスポンスのライフサイクルを廻すポイントってなに / Pinpoints of Incidentresponse Lifecycle for Operation
sakaitakeshi
1
300
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
288
19k
Code Reviewing Like a Champion
maltzj
513
39k
Building Applications with DynamoDB
mza
88
5.6k
Testing 201, or: Great Expectations
jmmastey
27
6.3k
jQuery: Nuts, Bolts and Bling
dougneiner
59
7.1k
Creatively Recalculating Your Daily Design Routine
revolveconf
209
11k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
124
32k
Gamification - CAS2011
davidbonilla
76
4.6k
Building a Scalable Design System with Sketch
lauravandoore
455
32k
Making Projects Easy
brettharned
108
5.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
36
2.5k
RailsConf 2023
tenderlove
2
530
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