I’m Jon Reid, and I want to introduce you to a new testing tool for Swift called ApprovalTests. Table of Contents Adding ApprovalTestsWriting Test CodeRunning Tests for iOSFile ArtifactsQuestions? Adding ApprovalTestsWe’re going to start in an iOS application. You can see I have a very simple app that has a place for unit tests.The first

Read More

What’s new for unit testing from WWDC21? Xcode 13 promises async, but many of us can’t use that for a couple of years. Instead, I want to look at new unit testing features we can use right away in Xcode 12.5. (Watch the 10-minute video above, or keep reading below…) Table of Contents Why Focus on

Read More

The Design Patterns book came out over 25 years ago. Are patterns still relevant today, especially for Swift developers?At Quality Coding  we train iOS developers in technical agile practices—such as refactoring. Recently I refactored a fully tested view controller to MVVM, model-view-view model. The example stopped at an interesting place. Here’s the code:There will be

Read More

Where does test-driven development (TDD) sit in the iOS ecosystem? Here’s a podcast about how I depend on TDD to develop software, and the backstory for why I do.Darko Fabijan, co-founder of Semaphore, invited me onto his podcast Semaphore Uncut. We had a very enjoyable half-hour chatting about how test-driven development is still somewhat foreign

Read More

How can you learn and practice test-driven development (TDD), or refactoring, or working with legacy code? I can explain the principles. But the question that comes back is, “But what do I actually do?” That’s what code katas are for. They’re not tutorials. They’re exercises, designed to help you grow in your technical agility. I’ll introduce

Read More