I’m super excited to release something that I’ve been working on for a while.
Unit testing on iOS is… not common. And part of the problem is that people don’t know where to start. It can be overwhelming.
Building on my years of experience leading iOS apps with over 80% test coverage, including at Google, and my extensive experience in curriculum development and education, I’ve put together a workshop that takes you through the process step by step. It covers:
- Writing unit tests on model classes.
- Using mocks.
- Unit-testing UI code (and how to test UIViewControllers!).
- Writing your first UIAutomation tests.
The (MIT-licensed) sample code is ready to go (just check it out from GitHub) so you can focus on writing better tests, not wrangling dependencies.
It’s fully digital. Download the PDF, and work through. Email support included.
Who is this for? If you have iOS experience and you:
- Haven’t written any tests and don’t know where to start, start at Section 1.
- Are comfortable writing unit tests but want to better test your UI code, start at Section 2.
This isn’t designed for people without iOS experience looking to learn iOS.
Some nice things people have said already:
“Thanks so much… it’s helped me a lot. I have a fairly large, complex code base that I want to add tests to and the workshop has helped me to think about how to even begin to do that.”
—Cathy @catshive
“I really like the workshop. I like the format and pacing, how you’ve structured the Xcode project and using unfulfilled/failing tests for the participant to add themselves. I’ll definitely check out KIF for my own projects, even if it’s just as a way to ensure my apps are properly Accessible.”
—Harry @inquisitivesoft
Buy it for 20 USD
Please note: this focuses on Obj-C not Swift, although the patterns should be applicable to Swift as well. I’m looking into a Swift version so let me know if that’s something you are interested in.
If you’re a student or underemployed, contact me and I’ll send you a discount code.
Thanks so much to the many people who tested, reviewed, and gave feedback.
16 replies on “Launching! iOS Unit Testing: Beyond the Model”
RT @catehstn: Launching! iOS Unit Testing: Beyond the Model http://t.co/6mpiKVpjC6
RT @catehstn: Launching! iOS Unit Testing: Beyond the Model http://t.co/6mpiKVpjC6
RT @catehstn: Launching! iOS Unit Testing: Beyond the Model http://t.co/6mpiKVpjC6
[…] you found this interesting, I’ve covered testing iOS apps in more detail in this workshop – there’s a sample app and a guide that takes you step by step through adding […]
[WORDPRESS HASHCASH] The comment’s server IP (69.163.242.185) doesn’t match the comment’s URL host IP (69.163.242.203) and so is spam.
Hi, I am interested in unit testing and your book. Do you have a sample chapter for review?
[WORDPRESS HASHCASH] The poster sent us ‘0 which is not a hashcash value.
Hey – no I don’t. You can see some of the techniques in this post:
http://www.cate.blog/2015/04/29/unit-testing-on-ios-beyond-the-model/
And you can check out the GitHub here:
https://github.com/catehstn/ios-unit-testing
[WORDPRESS HASHCASH] The poster sent us ‘0 which is not a hashcash value.
This looks awesome Cate. I, for one, would definitely be interested in a Swift version.
[WORDPRESS HASHCASH] The poster sent us ‘0 which is not a hashcash value.
+1 for a swift version
[WORDPRESS HASHCASH] The poster sent us ‘0 which is not a hashcash value.
Would be very interested in a Swift version! 🙂
[WORDPRESS HASHCASH] The poster sent us ‘0 which is not a hashcash value.
[…] More on  unit testing, with a focus on UI code, can be found in my unit testing workshop. […]
[WORDPRESS HASHCASH] The comment’s server IP (69.163.242.185) doesn’t match the comment’s URL host IP (69.163.242.203) and so is spam.
Being that Swift is rapidly coming into the fore, I would like to have the Swift equivalent.
[WORDPRESS HASHCASH] The poster sent us ‘0 which is not a hashcash value.
Awesome work @catehstn!
[WORDPRESS HASHCASH] The poster sent us ‘0 which is not a hashcash value.
[…] my first project of the year, I’m working on the Swift version of @catehstn’s iOS Unit Testing Workshop – you can sign up here if you’re […]
[…] Unit Testing in Swift Workshop – This is a Swift re-write of @catehstn’s iOS Unit Testing Workshop. It’s been on my list to do for a while, and now I finally […]
[WORDPRESS HASHCASH] Snoopy failed to fetch results for the comment blog url (https://www.natashatherobot.com/new-year-new-adventures/) with error ” and so is spam.
[…] my first project of the year, I’m working on the Swift version of @catehstn’s iOS Unit Testing Workshop – you can sign up here if you’re […]
[WORDPRESS HASHCASH] Snoopy failed to fetch results for the comment blog url (https://www.natashatherobot.com/swift-dependency-injection-with-a-custom-initializer/) with error ” and so is spam.
[…] to do. To learn more about writing tests you might want to have a look at Cate Hudson’s iOS Unit Testing: Beyond the Model I’ve just bought it so I can’t say for sure that it’s useful but it looks very promising and […]
[WORDPRESS HASHCASH] The comment’s server IP (66.96.183.4) doesn’t match the comment’s URL host IP (66.96.149.32) and so is spam.