Chapter 7. Code Coverage and Continuous Integration

We now have about 80 tests and the code that makes tests pass. But do the tests really test all the code? Using TDD, the code coverage of our tests should be quite high. Should.

Instead of guessing, we would rather have numbers that tell us how good the code coverage of our tests really is. Before Xcode 7, it was quite difficult to measure the coverage of a test suite. But with version 7, Apple added this feature to Xcode.

In this chapter, we will measure the code coverage of our tests, and we will take a look how we can use Xcode Server and fastlane to automate everyday tasks in our lives as iOS developers. The chapter is structured like this:

  • Enabling code coverage
  • Continuous integration
  • Automatic ...

Get Test-Driven iOS Development with Swift now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.