This task explains how you can view your code coverage data from within Workbench reports, HTML reports, or the editor.

You can also use the element icon
to filter the reported
elements. The icon serves as a toggle and can be used to either show
all report elements or only those that did not meet the acceptance
criteria. Note that each failed element is decorated in the report
with a red "x" overlay. For example, the following report filters
the above report to show only those elements that did not pass the
acceptance thresholds. Note that the code coverage results for payroll.cpp
are no longer reported:

Lastly, from the Workbench report you can open the source in the editor, either by double-clicking on the compilation unit (such as a source file or function) or right-clicking on the compilation unit and clicking Open in Editor.
Using the HTML report, you can sort columns to help you quickly identify unacceptable levels of coverage. You can sort the code coverage data by covered lines, total lines, or % coverage. Clicking on the column header within the report will toggle the sort order from ascending to descending order.
To see the detailed code coverage results for a specific module, compilation unit, or source file, click on it. For example, clicking on the payroll.cpp source file in the following report displays its code coverage details:
Use the
breadcrumbs to navigate back to a higher level report. For example,
click Overall Summary in this breadcrumb "
" to go back to the overall
summary.
To open the source code and view its code coverage results in the editor, from within the Workbench code coverage report either double-click on the compilation unit (such as a source file or function) or right-click the compilation unit and click Open in Editor. (This capability is not supported within HTML reports.) The source will open in the editor with decorations showing the code coverage for each line. By default, a green bar next to the line indicates that the line was covered; a red bar that it was not covered. Hold your mouse over the indicator to see the coverage specifics, as shown here:

By default, code coverage indicators are shown in the editor. You can remove the code coverage indicators from the editor, but code coverage is still enabled for the selected launch of the program. To turn the code coverage indicators off, right click on the ruler column of the editor and uncheck the Show Line Coverage option. You can also check the Show Line Coverage option at a later time to turn on the code coverage indicators again.