How to write unit tests for asynchronous behaviors in an app?
In this screencast, we’re going to look at writing unit tests for asynchronous behaviors in an app. Over the course of the video, we'll cover:
- How to write unit tests that verify an app’s network behaviors and asynchronous calls
- Using the XCTExpectation class to prevent test code from exiting prematurely
- Apple’s Network Link Conditioner which lets you simulate various network conditions so your app can be resilient to a slow network, or no network at all.
Apple Developer Documentation: Async Testing with Expectations
WWDC 2017: What’s New in Testing?
XCode Additional Tools