Sunday, September 8, 2024

iOS Dev Weekly – The best iOS development links, every Friday


Happy new device day! Thanks also for all of the kind wishes after last week’s issue. I’m feeling much better, thank you. ❤️

I want to write about this thread on the Swift forums this week. The title, “A New Approach to Testing in Swift”, and the authors being Developer Tools and XCTest team members was enough to make this significant, but the content is even better.

XCTest is a fine testing framework. It has all you need to write everything from a couple of individual unit tests to huge test suites with thousands. Outside of a few additions every year, though, it has looked and felt the same for a long time. This thread gives us a sneak peek at a successor to XCTest, and it’s an open-source package that Apple will develop in public! Even better, we’re being allowed to see it at a very early stage. I’d recommend starting by reading the vision document, but there’s plenty in the repository to explore already. The team are looking for feedback, so please read it and comment on the thread. I can’t wait to see how it develops. 🚀

I’ve dabbled with Quick and Nimble in the past, and while I feel very much at home with their approach, I always fall off, though, because of how their tests integrate with Xcode’s test reporting feature. That’s not the fault of those two (or any other) testing libraries but a symptom of how tightly coupled XCTest and Xcode are.

I am sure this new testing library will be wonderful and become the de-facto testing solution for Swift. However, I also hope the integration between it and Xcode will be open to other testing frameworks. There are hints in the document that point towards this being on the team’s mind, so I don’t think it’s out of the question. If so, I can see this ushering in a new era of fantastic testing tools for Swift in addition to this library.



Dave Verwer  

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles