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.
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.