Summary
Congratulations! You've made it to the end of this lengthy, information-packed chapter. You should know enough about testing and accessibility right now to begin exploring testing in greater depth than we have in this chapter.
No matter how small or big your app, writing automated tests will ensure that your app is of a high quality. More importantly, instead of assuming that something works because it worked before, your automated tests will guarantee that it works because your tests won't pass if you've broken your code.
In this chapter, you have learned the fundamentals about XCTest
: when to write tests, which type of tests to write (unit and integration), and how to isolate tests following the Arrange-Act-Assert pattern. You also learned about code coverage and how to m easure how much of your code is being tested. Finally, you learned about XCUITest
and how it can help you to test parts of your UI.
You also learned that writing testable code sometimes...