Testing Applications |
To verify an application, you need to add the application to the tool, select the test(s) you would like to run, and execute the application. Following are the details.
Tests within AppVerifier
The tests included in the Application Verifier are to help software developers avoid common mistakes by using verification layers to validate the usage of API families:
- Basics Verification Layer - These are the core set of tests that check for issues within heap, handles, locks, and more.
- Low Resource Simulation Verification Layer - This test simulates an environment under low resources for example, out of memory.
- Limited User Account Predictor Verification Layer - This test simulates an environment running as a user with a limited user account and has two primary goals: predictive and diagnostic. The predictive element determines whether an application that is running in an administrative environment would also run well in an environment with less privilege, as a limited user, for example. The diagnostic element evaluates an application when it is running as a limited user and identifies potential problems.
- Miscellaneous Verification Layer- This consists of two checks Dirty Stacks and Dangerous APIs.
Test differences between the last version and v3.0
There are a few tests that you will not find within this release of Application Verifier that were in previous releases:
-
Misc programming errors [MiscProgrammingErrors]
-
Obsolete API calls [ObsoleteAPICalls]
-
Registry usage [RegistryChecks]
-
Early timer rollover [TimerRollover]
-
DirectX file version [DXFileVersionInfo]
-
Design For Windows
These may return in the future.
Application and System Requirements
Remember, Application Verifier tests unmanaged code for 32 and 64 bit applications and will run on Microsoft Windows XP or greater. For more detailed information, please see Application Verifier Overview.
Note: Although Application Verifier is for unmanaged code it does validate managed code to a degree due to many applications are mixed code (managed and unmanaged). However, the CLR does get verified.
Start Testing an Application
To test an application you must first add the Application to the verifier tool. You can then select the tests you want enabled, save your test setup, and run your application.
To add an application to Application Verifier
-
On the
File
menu, select
Add Application
.
-
Browse to the application and click
Open
.
or
-
Right click within the
Applications
pane and select
Add Application
.
-
Browse to the application and click
Open
.
Note: After enabling the verifier for an executable file, all instances of that application on the system will be verified.
To select the tests to run
-
Select the checkbox next to the test you want to enable.
Selecting the checkbox next to a verification layer expands the list and selects all tests within the layer. You can then clear the tests you do not want to enable.
To enable all tests
-
On the
File
menu, select
Enable All Tests
. All test except
Low Resource Simulation
will be enabled.
or
-
Right-click the application and select
Enable All Tests
. All test except
Low Resource Simulation
will be enabled.
Note: If you wish to apply tests to multiple applications, you must do so via the command line since multi-application-select is not available currently in the user interface.
To save your test setup
-
When the tests you want enabled have all been selected, click
Save
.
or
-
On the
File
menu, select
Save
.
You may decide to close Application Verifier while running through your tests. Whether the Application Verifier user interface is open or closed, your application will be validated each time you run.
The tests that were selected will check the code of the application running and the actions being taken in the application. These tests will generate logs for each application and will continue until the application is removed from the list of applications within Application Verifier.
Note: to ensure good coverage of your application, run Application Verifier while performing all of your test cases.
Stop Testing an Application
Your application will continue to be checked, even when Application Verifier is closed, until you remove the application name from the tool.
To remove an application from Application Verifier
-
Select the name of the application
-
On the
File
menu, select
Delete Application
.
-
Click
Save
.
Once you've made this change and saved the settings, the application will no longer run under Application Verifier.
Note: by removing your application, it will not delete the logs that were previously generated.
Default tests
When an application is added to Application Verifier to test, a set of tests are already selected to run. The Basics are the default tests.
To revert back to the default tests
-
Select the application you want to change.
-
On the
File
menu, select
Restore Defaults
.
or
-
Right-click the application and select Restore Defaults.
Setting up a Debugger
The Basics verification layer within Application Verifier requires the application to be run under a debugger.
Before Application Verifier will allow you to save your settings when selecting one of these, it will provide a dialog reminding you that these tests require you to run under a debugger.
To obtain more information on how to run your application under a debugger, please refer the Debugger install and setup topic.