Merging Results

This tutorial describes how to merge two sessions containing coverage results to create new session containing the combined results. The two source sessions need to be for the same executable, preferably with the source files being identical for each session.

Session Manager

The first task is to ensure Coverage Validator can store at least two sessions in the session manager. The default for the session manager is one session.

  • Open the Session Manager by clicking Session Manager… on the Managers menu.
    Coverage Validator managers menu
  • The Session Manager is displayed. Increase the number of sessions to 2. Close the dialog with the Close button.
    Coverage Validator Session Manager Dialog

We now need to record two coverage sessions, each containing different coverage information.

Session 1

  • 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
  • If the launch icon is selected the Launch application dialog is displayed.
    Coverage Validator launch dialog

    • 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 Go! 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
  • Click the Test menu entry for Test1.
  • Close the application.

Session 2

  • Click on the relaunch icon to launch the most recently launched application.
    Coverage Validator re-launch icon
  • Click the Test menu entry for Test2.
  • Close the application.

Merging Session 1 and Session 2

  • Open the Session Manager by clicking Session Manager… on the Managers menu.
    Coverage Validator managers menu
  • The Session Manager is displayed, showing the two sessions just recorded.
    Coverage Validator Session Manager dialog merge coverage sessions
  • Click the Merge… button.
  • The Merge Sessions dialog is displayed.
    Coverage Validator Session Merge Dialog
  • The dialog allows you to specify which session remains unchanged and which session is modified by having the other session’s content merged with it. For this tutorial, leave the defaults as they are – the first session will be merged with the second session, with the results placed in the first session.Click the Merge button. The sessions will be merged and the dialog will close.
  • Select the session on the Session Manager that corresponds to the session the data was merged into. For this tutorial, this session is the first session. Click the Select button. The dialog will be dismissed and all displays will be cleared.
  • Click the Refresh All toolbar button to refresh all displays.
    Coverage Validator Refresh All icon
  • On the Coverage tab, select testsvw.cpp to display the source code. Scroll down the edit window until the OnTestPerformTest() and OnTestTest2() functions are shown. Both functions should indicate that they have been visited, indicating that data unique to each session is present in the merged session.
    Coverage Validator code coverage merge result
  • Save the session for future reference by using the Save menu entry on the File menu.

Fully functional, free for 30 days