iOS Unit Testing by Example: XCTest Tips and Techniques Using Swift
"iOS Unit Testing by Example: XCTest Tips and Techniques Using Swift" 1st Edition - With good unit tests, you may modify the design of your iOS code without fear. Using Xcode's built-in test framework XCTest and Swift, you can obtain immediate feedback on all of your code, even older code. Learn how to test any iOS code, including view controllers (UIViewControllers), which are important to iOS apps. Learn how to isolate and replace dependencies in old code that was not tested. Practice safe refactoring to enable these tests, and watch as all of your changes are tested swiftly and automatically. With perfect confidence, make even the most daring code modifications.
The deeper your navigation structure, the slower manual code and UI testing become. It might take many taps simply to get to a certain screen, let alone the real process checks. Automatic unit testing provides such quick feedback that it has the potential to modify the development norms. Bring testing to iOS development, even if the code is old. To develop unit tests in Swift for all of your code, use XCTest.
Unit tests are normally reserved for iOS model classes only. However, that technique avoids much of the code found in iOS apps, particularly UIViewControllers. Learn how to unit test these view controllers to broaden your testing options. Because solid unit tests provide the foundation for safe refactoring, you are free to make bold changes. Learn how to avoid the most common XCTest framework mistakes made by Swift programmers. To detect gaps in your test suites, use code coverage. Discover how to spot hard dependencies.
Author: Jon Reid
Link to buy: https://bom.so/BUe76w