Be safe – checking and improving your test coverage
Testing is important, but we need to make sure we test our code thoroughly, not just a part of it; covering all the code doesn’t only mean all the classes, but also all possible execution paths. We might think it’s easy to keep all possible cases in mind, and perhaps this is true for very small projects; but as the project grows and inevitably becomes more complex (for example, the number of features increases or the possible execution paths multiply), it becomes difficult to understand the efficiency of our tests for keeping us safe. This is why we introduce the concept of test coverage and a tool to measure it.
What is test coverage?
Test coverage, also known as code coverage, is a metric used to measure the extent to which the source code of a program is executed by a set of test cases. It is a quantitative measure that helps developers and testers understand how much of the code is being exercised during...