The example application is a great way to explore the capabilities of Coverage Validator.
The source and projects are included in the installation, but you'll need to build the example application yourself.
You can then use nativeExample.exe in conjunction with Coverage Validator to monitor the coverage of the application as you use it.
The best way to understand how Coverage Validator works is by example.
We recommend launching the example application from Coverage Validator and observing how the menu actions affect coverage information.
Examining the source code is the best way to see what's going on in the example application.
Resetting the statistics before and between using the menu items is a good way to easily see exactly what new code was executed and marked as included in the coverage.
For convenience, below we have provided the source locations where each menu action runs a test.
Most test locations are in the CTeststakView class of nativeExample\TESTSVW.CPP
File menu Exit closes the example application, which itself increases the code coverage.
Test menu ...
Test |
OnTestPerformtest() Calls a small number of test functions |
Test2 |
OnTestTest2() Calls a small number of other test functions |
LoadLibrary Test... |
OnCommandLoadLibrary() Opens a file browser for you to choose a test dll to load but doesn't call any other functions |
FreeLibrary Test |
OnCommandFreeLibrary() Frees up any previously loaded library above |
Colour menu ...
Red, Green, Blue, |
OnColourRed(), OnColourGreen(), etc Sets the background colour of the main window and repaints the window |
Reset |
OnColourReset() Calls the same method that accesses two more different methods |
Use if() statements |
OnColourUseifstatements() Affects the code path used when applying the background colours above |
Use switch() statements |
OnColourUseswitchstatements() Affects the code path used when applying background colours |
Help menu ...
About Coverage Validator Tester... |
CTeststakApp::OnAppAbout(), etc Shows a simple help dialog using code in nativeExample.cpp |