Unit Testing Pro Tip: Verify that your tests make assertions about the method under test and nothing else
Jul 31, 2020, 10:51 AM
Nothing else. Don’t make assertions about the code you wrote in the test. Don’t make assertions about other methods in other classes. Isolate the method you’re testing using mocks or stubs and only test the method...
Detect Displays on macOS
Jun 17, 2019, 2:05 PM
Sometimes when I use an external display with my MacBook Pro in clamshell mode, nothing shows up — I just get a black screen. And when this happens, forcing macOS to “Detect Displays” can help. To trigger “Detect...
Running unit tests from the command line with xcodebuild
Dec 17, 2018, 11:28 AM
Previously, we discussed how Xcode 9.4.1 cannot run unit tests for Frameworks on macOS Mojave. I mentioned there that the workaround is to run unit tests from the command line, and a reader wrote in to ask how to do that. Here’s the...
Xcode 9.4.1 cannot run unit tests for Frameworks on macOS Mojave
Oct 2, 2018, 2:35 PM
Are we still using Open Radar? Been a while since I’ve filed a bug report with Apple, but this one was too bad to let go. Xcode 9.4.1 will not run unit tests for Cocoa Touch frameworks on macOS Mojave. If you haven’t upgraded...
WWDC 2018 What’s New in Testing Recap
Jun 7, 2018, 4:55 PM
In Apple’s WWDC 2018 talk on What’s New in Testing, they announced a big new feature: parallel testing. Parallel testing runs your test suite on multiple simulators at once, in parallel, so it takes significantly less time to...
WWDC 2018 What’s New in Swift Recap
Jun 7, 2018, 9:47 AM
In What’s New in Swift at WWDC 2018, Apple gave a quick overview of what’s new in Swift 4.2 and Swift 5. You can read my notes below, or you can watch the 40-minute video and download the slides from Apple. Community updates...
WWDC 2018 What’s new in Cocoa Touch Recap
Jun 6, 2018, 1:10 PM
In What’s new in Cocoa Touch at WWDC 2018, Apple gave an overview of framework updates (largely focused on performance), API enhancements, and Siri shortcuts. You can read my notes from the talk below, and you can watch the video and...
WWDC 2018 Platforms State of the Union Recap
Jun 5, 2018, 4:28 PM
In the Platforms State of the Union at WWDC 2018, Apple discussed new and updated tools and frameworks for developers. You can read my notes from the talk below, or you can watch the video in the unofficial WWDC app for macOS or in the...
WWDC 2018 Keynote Recap
Jun 4, 2018, 4:14 PM
In today’s WWDC 2018 Keynote, Apple talked about new features and updates for iOS 12, watchOS 5, Apple TV, and macOS Mojave. If you missed the talk, you can get a quick overview with the rough cut of my notes below. You can also...
When to unit test private methods
May 29, 2018, 8:44 AM
Last week, we talked about why you shouldn’t unit test private methods. Today we’ll talk about why you should. Wait, what? I just told you that unit testing private methods was unnecessary because you can just test the public...