Swift Testing
Dive deep into Swift Testing related articles, from basics to advanced. Best practices explained with code examples.
Using the #expect macro for Swift Testing
Swift Testing is Apple's Swift framework for writing tests and introduces several macros, including the #expect macro. Where we had to use all kinds of XCAssert variations before, we can now rely on a powerful replacement that will help us debug tests more quickly. Before exploring this specific feature of ...
Using Traits to annotate and customize test behavior
Traits allow you to customize or annotate tests using the Swift Testing framework announced at WWDC 2024. They also allow you to configure common behaviors, like runtime evaluated conditions, to skip certain tests. Before exploring this specific feature of Swift Testing, I encourage you to read my introduction to Swift ...
Swift Testing: Validate your code using expressive APIs
Apple announced the Swift Testing framework during WWDC 2024. It transforms the way we write tests in Swift. A new clear, expressive API makes writing tests more straightforward, while the Xcode user interface communicates with improved feedback when a test fails or succeeds. The testing framework embraces Swift Macros, reducing ...
Master Mobile Monitoring SwiftUI AppsMonitor your app’s health with real-time insights into crash-free rates, start times, and more. Optimize performance and prevent user churn by addressing critical issues like app hangs, and ANRs. Learn how to keep your iOS app running smoothly across all devices by downloading this eBook.