WWDC2017のほぼ同名のセッションの内容について簡単にまとめました。
What's New inTesting!!!
View Slide
ࣗݾհ
ࣗݾհۄ৴ޛiOS Engineer!͖ͳframeworkHomeKitͱXCTestͰ͢झຯ"ిࢠ࡞⚡ےτϨ$ΨδΣοτ%
Parallel TestingLocalizationBlock-based test teardownMulti-app TestingFirstMatch APIActivitiesAttachmentsAsync Testing (Xcode8.3)
Parallel Testinghttps://developer.apple.com/videos/play/wwdc2017/102/
Localizationςετ࣌ͷLanguage/Regionࢦఆ͕ՄೳʹͳΓ·ͨ͠ɻxcodebuildͰ-testLanguage,-testRegionͰࢦఆՄೳ
Block-based test teardown
Multi-app Testing
FirstMatch API
Activities
͜Ε·Ͱͷςετ
͜Ε͔Βͷςετ
࣮ߦϩά͔Βݟͨҧ͍
Attachment
Screenshots
Attachment Lifetime Policies
Async Testing (Xcode 8.3)
XCTWaiter• XCTWaiterͱͯ͠ΣΠτॲཧʹؔ͢Δ෦͕XCTestCase͔Β͠·ͨ͠ɻ• ରͱͳΔexpectationΛ໌ࣔతʹෳͰ͖ΔΑ͏ʹͳΓ·ͨ͠ɻ• XCTWaiterDelegate• XCTWaiter.Result
XCTWaiter
XCTWaiterExplicitly expectation
XCTWaiter.ResultXCWaiter.Result͕ఆٛ͞Εɺ࣮ߦ݁Ռͱͯ͠ҎԼͷΑ͏ͳͷ͕ఆٛ͞Ε͍ͯ·͢ɻ• completed• timedOut• incorrectOrder• invertedFulfillment• interrupted
XCTWaiterDelegate• nestedWaiter(_:wasInterruptedByTimedOutWaiter:)• waiter(_:didTimeoutWithUnfulfilledExpectations:)• waiter(_:didFulfillInvertedExpectation:)•waiter(_:fulfillmentDidViolateOrderingConstraintsFor:requiredExpectation:)
XCTTestExpectation• expectedFulfillmentCount• isInverted• enforceOrder
isInverted
expectedFulfillmentCount
enforceOrder
XCTTestExpectation• ৽͍͠Expectation͕૿͑·ͨ͠ɻ• XCTKVOExpectation• XCTNSNotificationExpectation• XCTNSPredicateExpectation
https://developer.apple.com/videos/play/wwdc2017/409/
Ҏ্