Profiling the Sample Application #2

This tutorial demonstrates launching the sample application, closing the application and inspecting the coverage results.

  • Launch the sample application. Click on the launch icon on the toolbar. Alternatively to relaunch the most recently launched application, click the launch icon with a green recycle arrow around it
    Coverage Validator re-launch icon
  • The Launch application wizard is displayed.
    Coverage Validator launch wizard
  • Select the sample application nativeExample.exe using the Browse… button.
  • If the launch icon is selected the Launch application wizard is displayed.
    Coverage Validator launch wizard

    • Select the sample application nativeExample.exe using the Browse… button, or select a previously executed application from the list at the bottom of the dialog.
    • Click the Next button to move to the 2nd page of the wizard.
      Coverage Validator launch wizard
    • Leave the settings as the default settings.
    • Click the Next button to move to the 3rd page of the wizard.
      Coverage Validator launch wizard
    • Leave the settings as the default settings.
    • Click the Next button to move to the 4th page of the wizard.
      Coverage Validator launch wizard
    • Click the Start Application button to launch the application.
    • The nativeExample.exe application is started.
      Coverage Validator native example application
  • If the relaunch icon is selected the most recently started application is started (for this tutorial we will assume this is nativeExample.exe).
    Coverage Validator native example application
  • Whilst Coverage Validator is instrumenting the application various progress dialogs are displayed. The display of Coverage Validator updates to show the names of source code files and statistics about each file.
    Coverage Validator coverage display
  • Click the Help menu entry Help About Coverage Validator Tester…. The “About Box” for nativeExample is displayed. Click OK to dismiss the dialog box.
  • Close nativeExample.exe using the File menu Exit command. The application closes. Coverage Validator processes any remaining data and displays the final results.
  • The coverage results are displayed on the SummaryCoverageFunctions and Files and Lines tabs.
    • The Summary tab displays overall coverage information for the application.
    • The Coverage tab displays information relating to the coverage of each source file. Selecting a source file causes the source code for the file to be displayed in the right-hand pane of the splitter window.
    • The Functions tab displays information relating to each class and/or function in the application. Selecting a method causes the source code for the method to be displayed in the right-hand pane of the splitter window.
    • The Files and Lines tab displays information relating to the coverage of each file and line. This allows more detailed analysis than the Coverage tab. Selecting a source file causes the source code for the file to be displayed in the right-hand pane of the splitter window.

    The source code display indicates the lines that are instrumented by highlighting the background colour of the line according to its visited, non-visited, or non-instrumentable status. Visit counts are displayed to the left handside of the source code (and optionally in tooltips for each line). A red cross indicates a line that could not be instrumented, a green tick indicates an instrumented line that has been visited.

    Coverage Validator coverage source code display

    Notice that the number of lines visited for the source file nativeExample.cpp are higher than for the first tutorial. The reason for this is nativeExample.cpp contains the implementation of the “About Box” in the CAboutDlg class. The code for this class was executed when the Help menu entry was activated and when the OK button was clicked to dismiss the dialog box. The image to the right shows the source code display for CAboutDlg in nativeExample.cpp.

Fully functional, free for 30 days