SwiftUI Testing: a Pragmatic Approach
<p>Those traits are what the author calls “the four pillars of a good unit test”. And the interesting part is that we cannot maximize all of them. Some types of tests provide the best protection against regression and resistance to refactoring but with very slow feedback (like UI testing). At the end of the day, we have to think and decide the best trade-offs for our specific application and use cases.</p>
<p>I’ve been thinking a lot about this and how to apply that framework to improve my testing, especially applied to the view layer, where things are especially tricky. And more specifically to SwiftUI, where we are still rethinking good practices and patterns to better fit this new exciting platform.</p>
<p><a href="https://betterprogramming.pub/swiftui-testing-a-pragmatic-approach-aeb832107fe7"><strong>Learn More</strong></a></p>