Code Coverage views

The QNX Code Coverage perspective includes the following views:

Code Coverage Sessions view

The Code Coverage Sessions view lets you control and display multiple code coverage sessions.

Screen showing a code coverage session in the Code Coverage Sessions view.

This view shows the following information as a hierarchical tree for each session:

Session item Description Possible icons
Code coverage session Launch configuration name, coverage tool, and start time (for example, ccov102_factor [GCC Code Coverage] (7/2/03 2:48 PM))

The Inactive session icon

The Remove analysis icon

Project Project name and amount of coverage (for example, ccov102_factor [86.67%])

The Project icon

File File name and amount of coverage (for example, ccov102_factor.c [86.67%])

The C file icon

Function Function name and amount of coverage (for example, main [100%])

The Function icon

The Momentics IDE uses several icons in this view:

Icon Icon Color Meaning

The Has no coverage icon

White No coverage

The Has some coverage icon

Yellow Partial coverage

The Has 100% coverage icon

Green Full (100%) coverage

The Out-of-Sync file icon

(cell is highlighted) Out-of-date source file
x Red An error marker to indicate some type of error (for example, a data file was not found, or an error reading data or notes files occurred).

The Momentics IDE also adds a coverage markup icon (The Has coverage marker icon) to indicate source markup in the editor. For more information, see Examine data line-by-line.

To reduce the size of the hierarchical tree, you can click The Collapse All icon.

Code Coverage Properties view

The Properties view shows a summary of the code coverage for a project, file, or function that you select in the Code Coverage Sessions view. This view tells you how many lines were covered, not covered, and so on.

Screen showing the summary of the code coverage results for a selected project in the Properties view.

Code Coverage Report view

The Code Coverage Report view provides a summary of your session in an XML file. This view lets you drill down into your project and see the coverage for individual files and functions:

Screen showing the Code Coverage Report view summary.

Generate a report

  • In the Code Coverage Report view, right-click a session and select Generate Report.

By default, the Momentics IDE displays reports in the Code Coverage Report view, but you can also displays reports in an external browser. You can compare several reports at the same time by using an external browser.

Change views

To toggle between viewing reports in the Code Coverage Report view and an external browser:

  1. On the Window menu, click Preferences.
  2. Expand General > Web Browser.
  3. Select or clear the Use external Web browser check box.
  4. Click OK.

Save a report

  • In the Code Coverage Report view, right-click a session and select Save As.

Refresh a report

  • In the title bar of the Code Coverage Report view, click The Refresh icon.

Print a report

  • In the title bar of the Code Coverage Report view, click The Print icon.

Set report options

By default, the report generated by the Momentics IDE doesn't include the code coverage information from other included files. You can set your report options to view this information.

  1. On the Window menu, click Preferences.
  2. Expand QNX > Code Coverage.
  3. Select Show code coverage information from included files.
  4. Click OK.

Last modified: 2014-11-17



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus