Expanded

Advanced Unit Testing with Swift​ iOS Through Mocks and Stubs

The ability to remove external dependencies from your Swift app when testing is one of the pillars of creating reliable iOS apps. This course teaches how to remove external dependencies and elevate your unit testing with mocks and stubs.
Course info
Rating
(12)
Level
Intermediate
Updated
Apr 3, 2018
Duration
1h 35m
Table of contents
Description
Course info
Rating
(12)
Level
Intermediate
Updated
Apr 3, 2018
Duration
1h 35m
Description

At the core of unit testing any Swift app is a thorough knowledge of how to create small, fast, and isolated tests that don’t depend on external systems. In this course, Advanced Unit Testing with Swift iOS Through Mocks and Stubs, you’ll learn how to remove external dependencies in your tests through the use of mocks and stubs. First, you’ll learn what mocks and stubs are. Next, you’ll explore how to mock iOS framework classes and remove their dependencies. Finally, you’ll discover how to inject your newly created mocks into production classes, which allows for the use of one context in production and another in testing. When you’re finished with this course, you’ll have a foundational understanding of Swift unit testing with mocks and stubs that will help you as you move forward to building more reliable Swift apps.

About the author
About the author

Brett Romero is Founder of Bitesize Business School, author of three books and seven iOS applications.

More from the author
Swift iOS UI and Unit Testing
Beginner
1h 41m
May 17, 2017
More courses by Brett Romero
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hi everyone, my name is Brett Romero, and welcome to my course, Advanced Unit Testing with Swift iOS Through Mocks and Stubs. I'm a software developer and business coach at Bitesize Business School. In this course we're going to take our knowledge of Swift unit testing to the next level through the use of mocks and stubs. Some of the major topics we'll cover include a thorough understanding about what mocks and stubs are, mocking NSUserDefaults, so we're getting into some of the iOS frameworks, the limitations of trying to mock something like an asynchronous function, and we'll also see how to mock core data. By the of this course you'll know when to use mocks and stubs, as well as having a broader testing skillset that you can then take back to your team to enhance its overall productivity. Before beginning the course you should be familiar with Swift and unit testing. From here you should be comfortable diving into more Swift with courses on iOS 11 Fundaments and Design Patterns in Swift. I hope you'll join me on this journey to learn about mocks and stubs and Swift unit testing with the Advanced Unit Testing with Swift iOS Through Mocks and Stubs course at Pluralsight.