Nick Teissler

Asynchronous Unit Testing

Nick Teissler | Apr 30, 2018

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.

Basic knowledge or experience building iOS applications is recommended.

For the More Curious...

Github API
Apple Developer Documentation: Async Testing with Expectations
WWDC 2017: What’s New in Testing?
XCode Additional Tools
Unit Testing: What, Why, and How
BNR Guide to iOS
BNR Guide to Swift
iOS & Swift Courses

Subscribers Only

Transcripts are for subscribers. Create an account today to access our collection of screencasts, skill packs, and more.

Subscribers Only

Project files are only available for subscribers. Create an account today to access our collection of screencasts, skill packs, and more.

Need Help?

If you get stuck, try starting a discussion with Big Nerd Ranch experts in the community tab.

Skill Pack

This screencast is part of a skill pack called iOS Testing.

Related Screencasts

Explore other screencasts related to this topic.