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
New Features of XCTest on Xcode 6
Search
Tsuyoshi Yamamoto
July 11, 2014
Programming
0
540
New Features of XCTest on Xcode 6
WWDC2014で発表された、Xcode6のXCtestに追加された新機能について、説明した資料です。
この資料では、以下の項目について説明しています。
* 非同期API
* パフォーマンステスト
Tsuyoshi Yamamoto
July 11, 2014
Tweet
Share
More Decks by Tsuyoshi Yamamoto
See All by Tsuyoshi Yamamoto
立ち上げ期のフィードバックとYOWを使ってみた話、ドキュメントとの付き合い方も変わった話
nomadmonad
0
130
辛さしかないふりかえりの口当たりを良くしていった話をふりかえる
nomadmonad
0
870
ふりかえり はじめの一歩 切ってみよう
nomadmonad
0
78
ざっくりわかるHTML5
nomadmonad
1
390
Other Decks in Programming
See All in Programming
Node-RED を(HTTP で)つなげる MCP サーバーを作ってみた
highu
0
120
Advanced Micro Frontends: Multi Version/ Framework Scenarios @WAD 2025, Berlin
manfredsteyer
PRO
0
340
チームで開発し事業を加速するための"良い"設計の考え方 @ サポーターズCoLab 2025-07-08
agatan
1
450
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
570
Hack Claude Code with Claude Code
choplin
5
2.4k
AIともっと楽するE2Eテスト
myohei
7
2.9k
#kanrk08 / 公開版 PicoRubyとマイコンでの自作トレーニング計測装置を用いたワークアウトの理想と現実
bash0c7
1
880
iOS 26にアップデートすると実機でのHot Reloadができない?
umigishiaoi
0
130
脱Riverpod?fqueryで考える、TanStack Queryライクなアーキテクチャの可能性
ostk0069
0
320
生成AI時代のコンポーネントライブラリの作り方
touyou
1
250
GitHub Copilot and GitHub Codespaces Hands-on
ymd65536
2
150
効率的な開発手段として VRTを活用する
ishkawa
0
150
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.1k
The Invisible Side of Design
smashingmag
301
51k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Code Review Best Practice
trishagee
69
19k
It's Worth the Effort
3n
185
28k
The Language of Interfaces
destraynor
158
25k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
Adopting Sorbet at Scale
ufuk
77
9.5k
Transcript
New Features of XCTest on Xcode 6 Tsuyoshi Yamamoto
New Features w ඇಉظςετ༻ͷ"1* 9$5FTU&YQFDUBUJPOΫϥε FYQFDUBUJPO8JUI%FTDSJQUJPOͳͲͷ"1* ! w ύϑΥʔϚϯεଌఆ༻ͷ"1* NFBTVSF#MPDLTɺ
NFBTVSF.FUSJDTͳͲͷ"1*
APIs for Asynchronous Testing w 9$5FTU&YQFDUBUJPO ඇಉظͳৼΔ͍Λςετ͢Δͱ͖ɺ ظ௨Γʹ࣮ߦ͞Ε͔ͨΛධՁ͢ΔΫϥε ! GVMpMM͕ݺͼग़͞ΕΕظ௨Γͱఆ
APIs for Asynchronous Testing w XBJU'PS&YQFDUBUJPO8JUI5JNFPVU ඇಉظͳৼΔ͍Λ࣮ߦ͍ͯ͠Δؒɺ 3VO-PPQΛճ͠ଓ͚ͯXBJU͢ΔͨΊͷ"1* ! 9$5FTU&YQFDUBUJPO͕ظ௨Γʹಈ͍ͨͱ
ఆ͞ΕΔ͔ɺλΠϜΞτ͢Δ·Ͱػ
Sample for Asynchronous Testing - (void)testDocumentOpening { XCTestExpectation *expect =
[self expectationWithDescription:@“open”]; ! UIDocument *doc = ...; ! [doc openWithCompletionHandler:^(BOOL success) { XCTAssert(success); [expect fulfill]; } ! [self waitForExpectationsWithTimeout:5.0 handler:nil]; }
Sample for Asynchronous Testing - (void)testDocumentOpening { XCTestExpectation *expect =
[self expectationWithDescription:@“open”]; ! UIDocument *doc = ...; ! [doc openWithCompletionHandler:^(BOOL success) { XCTAssert(success); [expect fulfill]; } ! [self waitForExpectationsWithTimeout:5.0 handler:nil]; }
Other Expectations XCTestCase+AsynchronousTesting.hʹɺ Convenience APIsͱͯ͠Ճ͞Ε͍ͯͨAPI ! - keyValueObservingExpectationForObject: keyPath: expectedValue:
! - keyValueObservingExpectationForObject: keyPath: handler: ! - expectationForNotification: object: handler:
APIs for Performance Testing w NFBTVSF#MPDL Ҿͱͯ͠͞Εͨଌఆ༻ͷ#MPDLTΛ ճ࣮ߦ͠ɺ#MPDLTશମͷ ฏۉ࣮ߦ࣌ؒ
࣮ߦ࣌ؒͷΒ͖ͭ߹͍ʢඪ४ภࠩʣ Λ#BTF-JOFͱൺֱ͠ɺ ςετͷ4VDDFTT'BJMVSFΛධՁ͢Δ ! #BTF-JOFύϑΥʔϚϯεධՁ࣌ͷج४ɻ ɹҎલ࣮ߦͨ͠ςετ݁ՌͳͲΛݩʹઃఆͰ͖Δ
Sample for Performance Testing - (void)testDocumentOpeningPerformance { TestTargetClass *target =
[TestTargetClass new]; ! [self measureBlock:^{ [target openFile]; [target parse]; [target closeFile]; }]; }
Sample for Performance Testing - (void)testDocumentOpeningPerformance { TestTargetClass *target =
[TestTargetClass new]; ! [self measureBlock:^{ [target openFile]; [target parse]; [target closeFile]; }]; }
Other Measurement w NFBTVSF.FUSJDT Ҿͱͯͨ͠͠ଌఆ༻#MPDLTͷ͏ͪɺ ܭଌ͍ͨ͠ՕॴΛίʔυͰࢦఆͰ͖Δɻ ! ଞͷ༰NFBTVSF#MPDLͱಉ͡
Sample for Performance Testing - (void)testDocumentOpeningPerformance { TestTargetClass *target =
[TestTargetClass new]; ! [self measureMetrics: [[self class] defaultPerformanceMetrics] automaticallyStartMeasuring:NO forBlock:^{ [target openFile]; [self startMeasuring]; [target parse]; [self stopMeasuring]; [target closeFile]; }]; }
Sample for Performance Testing - (void)testDocumentOpeningPerformance { TestTargetClass *target =
[TestTargetClass new]; ! [self measureMetrics: [[self class] defaultPerformanceMetrics] automaticallyStartMeasuring:NO forBlock:^{ [target openFile]; [self startMeasuring]; [target parse]; [self stopMeasuring]; [target closeFile]; }]; }
Happy Testing!! This Slide uses Azusa Template