To switch to the Code Coverage report, select the Code Coverage tab. In the Report Browser, expand the CodeCoverage node. The Report Browser should look like this:
Notice how the functions Sum was only partially covered by the test, and call was not covered at all. In the Report Browser, double-click CheckCoverageStatement. This takes you to the portion of code which has not been covered. Just as before, non-covered statements are in red.
Click on the loop indicators. This displays a popup showing the coverage depending on the number of loops executed by the statement.
To summarize, the execution of our test produced:
Two failed tests
Incomplete coverage of code during the test
The higher the coverage rate, the more complete are the tests. Increasing test coverage can detect more defects, therefore it is important to aim for a high coverage rate.
Now, let's address these issues.