How much code coverage is enough?

What value of code coverage is enough? This question cannot be answered because it mostly depends on the project and people working on the project. In fact, it is often better to ignore the code coverage data altogether, because it only has a limited value to decide whether tests are missing. But if you search the internet for this question, you will find a lot of different opinions on the topic. You might have to find your own answer to this question.

In my opinion, the one and only measurement to answer whether there are enough tests is your confidence. If you are confident that the code you've written is working because you've tested all the relevant aspects of it, then you have enough tests.

But, nevertheless, ...

Get Test-Driven iOS Development with Swift 4 - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.