Understanding the importance of testing
For many developers, testing is an unnecessary overhead they must deal with when writing code.
This way of thinking is somehow understandable. We’ve finished writing our code, built an application, and seen that everything runs as expected. Instead of moving to our next task, we need to change the target, adding a test function just so we can see again that it works fine. Why waste our time on it?
Also, in many cases, writing these test functions takes a lot of work. How can we test a SwiftUI view or a network call? What does it even mean?
These all summarize why testing is not a common practice, or at least not enough.
The root of this problem is how developers approach testing and writing code in general. Testing is more than checking whether our functions run as expected; it’s about code structure, separation of concerns, the writing process, working culture, and how we treat our day-to-day jobs.
Let’s look...