Session comparison can be used as part of manual regression testing to detect any differences between sessions including leaks, errors, or anything else.
A good practice might be to also use session comparison with automated regression tests to provide similar data on a daily basis.
This helps developers or quality assurance departments track issues on a continual basis rather than when just things get so bad that something needs to be done.
To demonstrate a simple session comparison we'll run the example application twice.
In the second run we'll allocate more objects that are not deallocated than in the first run.
We'll use Memory Validator to compare the two sessions to show which leaks are common to both runs and which leaks were present only in the second run.
Managers menu Session Manager set Maximum number of sessions to at least 2 allows several sessions to be kept at the same time
launch nativeExample.exe wait until attaching is complete
File menu Exit
wait for data transfer to complete
This first run is the baseline session.
launch nativeExample.exe wait until attaching is complete
Allocations menu C Runtime (C/C++) Heap Allocate memory... shows the Test Memory dialog OK to accept the default values
File menu Exit
wait for data transfer to complete
This second run is the comparison session.
Now that we have two sessions, we can compare them to look for common leaks, improvements and regressions. |
Managers menu Session Manager select the two recent sessions
•Compare shows the compare sessions dialog check the baseline session is the one with the earlier timestamp
•Compare shows the Session Memory Comparison dialog
The Session Memory Comparison dialog displays all the regression, improvements and leaks common to both sessions.
You can filter, search and export the results, search the results and export the results as HTML or XML.
In this example you should see one item marked as a regression, and all the rest of the leaks being common to both sessions.
•expand the regression item shows the regression leak allocation in CTeststakView::OnTestAllocatememory()