Your next career begins with
Save 50% off your seat in our next iOS Bootcamp. Limited time only. Sessions start April 3.
iOS Test-Driven Development by Tutorials
Version history
Second Edition · iOS 15, Swift 5.5, Xcode 13 (Selected)
Jan 19 2022First Edition · iOS 13, Swift 5.1, Xcode 11
Oct 2 2019The book that teaches you to write maintainable and sustainable apps by building them with testing in mind or adding tests to already-written apps. By Michael Katz & Joshua Greene.
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Who is this for?
This book is for intermediate iOS developers who already know the basics of iOS and Swift development but want to learn how to write code which is both testable and maintainable.
Covered concepts
- The TDD Cycle
- Test Expressions and Expectations
- Test RESTful Networking
- Test Authentication
- Legacy Problems
- Breaking Dependencies into Modules
- Refactoring Large Classes
This book is for intermediate iOS developers who already know the basics of iOS and Swift development but want to learn how to write code which is both testable and maintainable.
To start, you’ll learn the TDD Cycle and how to implement these concepts...
moreLearn How to Test iOS Applications!
This book is for intermediate iOS developers who already know the basics of iOS and Swift development but want to learn how to write code which is both testable and maintainable.
To start, you’ll learn the TDD Cycle and how to implement these concepts within an iOS application. The book then takes you through Test Expressions and Expectation so that you can test synchronous code. You’ll then write tests to verify networking endpoints and the ability to mock the returned results, followed by writing tests that run against authentication endpoints. Continue trouble-shooting your apps by understanding common legacy problems, as well as breaking dependencies into modules. And, finally, refactor large classes into smaller, more manageable classes and objects.
Before You Begin
This section tells you a few things you need to know before you get started, such as what you’ll need for hardware and software, where to find the project files for this book, and more.
Section I: Hello, TDD!
This section is a high-level introduction to test-driven development, how it works and why you should use it. You’ll also learn about the TDD cycle in this chapter, and you’ll use this throughout the rest of the book.
Section II: Beginning TDD
This section will teach you the basics of test-driven development (TDD). You’ll learn about setting up your app for TDD, test expressions, dependency injection, mocks and test expectations.
Along the way, you’ll build a fitness app to learn the basics of TDD through hands-on practice.
Section III: TDD With Networking
This section will teach you test-driven development with networking.
You’ll get hands-on experience creating a puppy-buying app that interacts with a backend service. You’ll learn how to do TDD for RESTful networking, using network clients and downloading images throughout this section.
Section IV: TDD in Legacy Apps
This section will show you how to start test-driven development in a legacy app that lacks sufficient unit tests. You’ll learn strategies for introducing TDD into existing apps, methods for visualizing and splitting up dependencies, ways to add features safely alongside existing code and how to refactor large classes.
Throughout this section, you’ll introduce TDD into an app for managing a business. The app is feature-rich with spaghetti code and ready for a TDD clean up!
Several techniques and concepts in this section were inspired by Michael Feather’s book Working Effectively with Legacy Code. Reading that book isn’t a strict requirement for working through these chapters. However, you’ll likely benefit by having some familiarity with the topics herein if you already have read it!
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development — plans start at just $19.99/month! Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.
Learn more