Video description
Use XCTest, which Apple provides out of the box with XCode, to test all networking and model layers and plan classes. This is your opportunity to test against several different edge cases since it’s easy to simulate different conditions. Unit testing your controllers is complicated because controllers rely on the UIKit controller life cycle that's not available in the test environment. Therefore, it’s easier to use UI Testing (also provided by Apple with XCode) to write integration tests. Write a few of them covering your happy paths.
Adding your tests on CI and running them automatically on every commit to your mainline branch will help you avoid timely manual tests or a failing app. Your tests will always be up to date and work for you instead of getting in the way.
What You Will Learn
- Do test-driven development with Xcode
- Write robust tests covering just the use cases you need
- Use automated testing to avoid wasting time
Who This Video Is For
Software developers and team leads working with Swift on iOS applications in an Apple environment.Product information
- Title: Practical Test-Driven Development with Xcode and Swift: Write Modularized Code for TDD with XCTest and UIKit
- Author(s):
- Release date: November 2020
- Publisher(s): Apress
- ISBN: 9781484266670
You might also like
book
Test-Driven Development in Swift: Compile Better Code with XCTest and TDD
Leverage Swift to practice effective and efficient test-driven development (TDD) methodology. Software testing and TDD are …
book
Modularizing Legacy Projects Using TDD: Test-Driven Development with XCTest for iOS
Improve current or new projects with top notch testability and maintainability. Writing tests improves the design …
video
iOS Development with Swift in Motion
One billion iPhone and iPad users are waiting for the next amazing app. It's time for …
book
Mastering Swift Package Manager: Build and Test Modular Apps Using Xcode
Maintaining an iOS project often results in thousands of code files scattered around your folders. Did …