Code Coverage Sample Application #2

This tutorial demonstrates launching the sample application, closing the application and inspecting the coverage results. This tutorial is similar to the previous tutorial, but with something extra.

  • If you have just run the previous tutorial, you can relaunch the previously launched application.
    • Relaunch the previously launched application. Click on the relaunch icon on the toolbar.
      Coverage Validator relaunch toolbar
  • If you haven’t just run the previous tutorial, you need to launch the sample application.
    • Launch the sample application. Click on the launch icon on the toolbar.
      Coverage Validator launch toolbar
    • The Launch Application or Service dialog is displayed.
      Coverage Validator launch application or service dialog
    • Click Launch Native and .Net Applications. The Launch application wizard is displayed.
      Coverage Validator launch native application wizard page 1
    • Select the sample application nativeExample.exe using the Browse… button.
    • Click the Next button to move to the 2nd page of the wizard.
      Coverage Validator launch native application wizard page 2
    • Leave the settings as the default settings.
    • Click the Next button to move to the 3rd page of the wizard.
      Coverage Validator launch native application wizard page 3
    • Click the Start Application button to launch the application.
  • The nativeExample.exe application is started.
    Coverage Validator native example
  • 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 summary display for native example
  • Click the Help menu entry Help About Coverage Validator Tester…. The “About Box” for nativeExample is displayed.

    Coverage Validator native example About box.

  • 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 SummaryCoverage, Branch Coverage, Functions, Directories, DLLs and Files and Lines tabs.
  • 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.
    Coverage Validator native example About Box source code coverage

Fully functional, free for 30 days