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 empty

We now need to record two coverage sessions containing different code coverage.

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 relaunch toolbar
  • If the launch icon is selected the Launch application dialog is displayed.
    Coverage Validator launch native application 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 Launch button to launch the application.
    • The nativeExample.exe application is started.
      Coverage Validator native example
  • 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
  • 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 relaunch toolbar
  • 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 with 2 sessions
  • Click the Merge… button.
  • The Merge Sessions dialog is displayed.
    Coverage Validator merge session dialog
  • The dialog allows you to specify which session remains unchanged and which is modified by merging the other session’s content 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 toolbar
  • 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 native example testsvw.cpp Test1 and Test2
  • Save the session for future reference by using the Save menu entry on the File menu.

Conclusion

In this tutorial, you have learned how to configure the session manager for session merging and how to merge two sessions using the session manager.

Fully functional, free for 30 days