If you aren’t listening to the Accidental Tech Podcast, you should be. It’s by far my favorite podcast. On this week’s episode, episode 168, Marco Arment reaffirmed his stance that he does not unit test his code. The context of the conversation was that Marco was discussing how he had to put in an emergency fix for an upgrade to his sync algorithm for his iOS podcasting app, Overcast. The co-hosts on the show, John Siracusa, and Casey Liss immediately jumped all over him to point out that this was exactly the sort of problem that automated tests are intended to fix.
This isn’t new news that Marco doesn’t unit test his code, he’s talked about this in the past. I’ll be giving a talk at Philly CocoaHeads this week on automated testing, and one of the things that I’ve been wrestling with is: where do I begin the talk? How much background should I assume? Are we still at the point as a community where we need to debate whether automated testing is a good/worthwhile thing? If you’ve read other posts on this blog, my stance should be obvious- half the posts I’ve written so far have been in favor of automated testing! It’s been a while since I’ve worked in other platforms than iOS, but I hear communities like Ruby on Rails and .Net have incredibly deep adoption of automated testing and test driven development principles. And on iOS, there really are plenty of both open source options, and even Apple-endorsed options for adding automated tests to your code.
So why are we still debating whether automated testing is even a thing? To me, it’s not about critiquing Marco about his development practices. It’s about recognizing that 1 out 3 senior engineers on a popular podcast don’t write automated tests. Is that representative of our community?
For my talk this week, I want to address this, and I’m thinking this is where I’ll open it up for conversation at the end of the talk. The majority of the 30 minutes will be focused on some how-to techniques for adding automated tests into your apps.
I like this trend that I’ve started now of capturing “testing in the wild” – how last week I dropped the reference to Sam Soffes’ perspective on automated testing. In a lot of ways, these popular people in our industry have a lot of power. I can imagine if I were an aspiring iOS engineer hearing that Marco doesn’t unit test his software – it would certainly make me think twice about whether it’s a worthwhile endeavor.