Jaim zuber cover

Stylish Developers Guide to Unit Testing in Swift

Unit testing is like eating your vegetables. We know we should do it, but can always find an excuse not to. The Unit Test evangelists aren’t much help. They tout endless benefits while providing trivial code examples that don’t match what iOS developers need to build. The evangelists don’t tell you that learning to write testable code is hard. Even if you mastered testing in Objective-C, the static typing of Swift requires a new batch of techniques.

Get more development news like this

This presentation will cut through the hype and give production proven techniques to get your apps under test. We’ll point out the common patterns that make testing hard and provide better alternatives.

We’ll answer questions like: How do I test my ViewControllers? How can I test Storyboard code? How do I survive without a mocking library or partial mocks?

Learning to write testable code may be hard, but at the other end is more reliable code. As a bonus, learning to write unit tests makes your code better, even when you’re not writing tests.

Next Up: New Features in Realm Obj-C & Swift

General link arrow white

About the content

This talk was delivered live in June 2016 at AltConf. The video was recorded, produced, and transcribed by Realm, and is published here with the permission of the conference organizers.

Jaim Zuber

Jaim is an independent iOS consultant, Panelist on the iPhreaks Podcast and Freelance CTO. He lives in Minneapolis with his wife and assorted furry creatures. He likes biking, BBQ, and strumming on a variety of instruments, sometimes in public.

4 design patterns for a RESTless mobile integration »