Export (0) Print
Expand All

Testing Applications with AppVerifier

Published: January 01, 2002 | Updated: December 08, 2005
By Todd Phillips

Microsoft Corporation

Application Verifier (AppVerifier) is a runtime verification tool used in testing applications for compatibility with Microsoft Windows XP. This tool can be used to test for a wide variety of known compatibility issues while the application is running. This article details the steps for using AppVerifier as an effective addition to the application development and testing cycles.

On This Page

Introduction
Installing AppVerifier
Testing an Application Using AppVerifier
Reviewing AppVerifier Logs
Summary
Related Links

Introduction

Testing applications for compatibility with Microsoft Windows XP can be a very complicated process. Fortunately, the Application Verifier (AppVerifier) tool can assist with this task. AppVerifier encompasses areas that are specifically designed to test for commonly encountered application compatibility issues, and some very subtle kernel issues.

With the importance of testing your own applications before applying for the Designed for Windows XP logo, many developers are looking for tools and guidelines to ease them through the process. AppVerifier makes comprehensive application testing a reality.

Installing AppVerifier

This section discusses how to install AppVerfier.

A Simple Process

Installing AppVerifier is a simple process. A basic requirement for using AppVerifier, however, is that you install it on Windows XP or above. AppVerifier will not install on Microsoft Windows 2000. The main window of AppVerifier is shown in Figure 1.

Figure 1: The main working window of AppVerifier

Figure 1: The main working window of AppVerifier

System Requirements for AppVerifier

The system requirements for running AppVerifier are the same as those for Windows XP:

  • Pentium 233 MHz (or equivalent) or greater

  • 64 MB RAM (128 MB of RAM recommended)

  • 650 MB of free disk space (more for network installs)

  • VGA monitor

  • Mouse or other supported pointing device

  • CD-ROM or DVD drive

For more information regarding supported hardware, please consult the Hardware Compatibility List (HCL).

Installing AppVerifier

The Application Verifier tool is available on the Microsoft download center.

To install AppVerifier on your Windows XP system

  1. Access the download center page

  2. Select to download the file from the site.

Once the Application Verifier has been installed, it can be accessed through the Start menu.

Testing an Application Using AppVerifier

This section discusses how to test an application using AppVerfier.

The first thing to note about AppVerifier is that it is not an automated test program for your applications. AppVerifier attaches to a program and performs tests whenever you run the program. It is possible to use AppVerifier and an automated test procedure simultaneously. AppVerifier attaches a "stub" or small piece of code to the executable program you are testing so that AppVerifier will be engaged every time the program is run.

To test an application with AppVerifier

  1. To open AppVerifier, click Start, and then click Programs.

  2. Under Programs, click Application Verifier.

  3. Right click the mouse in the Application section of the main page and click Add Application to display the Add Application dialog box shown in Figure 2.

    Figure 2: Using the Add Application dialog box to select an executable file to test

    Figure 2: Using the Add Application dialog box to select an executable file to test
  4. Browse to your application, and select the executable file to test. Double-click to open the file. Repeat Steps 3 and 4 for any additional executables to be tested.

  5. In the test settings pane, see Figure 3, select the tests you want to perform from the following list:

    Figure 3: Using the Tests area, click the checkbox next to the test to run.

    Figure 3: Using the Tests area, click the checkbox next to the test to run.
    • Memory

      Ensures APIs for virtual space manipulations are used correctly.

    • TLS

      Ensures that Thread Local Storage APIs are used correctly

    • Low Resource Simulation

      This simulates an environment under low resources for example, out of memory.

    • Limited User Account Predictor

      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

      Consists of Dirty stacks and Dangerous APIs.

  6. Save the settings within Application Verifier

  7. To start testing, simply use the application. Try to use all of the program's functions to generate the best data for the AppVerifier logs. Close the application when finished.

  8. View the test results in the AppVerifier log file by clicking View Logs in AppVerifier.

The test settings you specify for a particular application will remain active every time you run the program until the program is removed from the list of applications in AppVerifier. You can run programs repeatedly while working out problems.

Testing at the Kernel Level

The first six tests in AppVerifier look for compatibility issues at the kernel level. Because of this, the best output from these tests is acquired with the use of a separate kernel debugger. The kernel tests are designed to generate access violation errors when they encounter an error in the program being tested. This is so the kernel debugger will break in at precisely that point in the application's execution. If you run an application through AppVerifier without a debugger attached, and one of the kernel tests finds an error, the application will appear to crash.

To run the application using a debugger, set all the options and tests desired in AppVerifier, and then launch the application with a debugger according to the instructions for that debugger. For example, to debug "myapp.exe" with NTSD (the Windows XP system debugger), the user would go to a command line and type:

ntsd myapp.exe

Any debugger can be used. It is assumed that users running these tests are familiar with using a debugger. If you are not comfortable using a debugger, you can run the tests by selecting the Use the appverifier debugger to get crash logs and log kernel checks option. If the program crashes, exhibits unusual behavior, or kernel messages are logged, the problems should be investigated by an experienced developer who can run the application with a debugger.

Reviewing AppVerifier Logs

The purpose of AppVerifier is to gather information about possible issues with your applications. Information is collected in the AppVerifier log file. To access this information, click the View Logs button in AppVerifier to open the dialog box shown in Figure 4.

Figure 4: The Logs dialog box gives you complete access to the information gathered by AppVerifier.

Figure 4: The Logs dialog box gives you complete access to the information gathered by AppVerifier.

The log results pane displays a list of logs per application that has been tested. To view the details select the log and click View. This will display the log in a browser. Or you can click Save As and open it in Excel as an example.

Summary

The Application Verifier (AppVerifier) tool is a useful addition to software testing procedures for Windows-based applications. AppVerifier contains several tests that enable a tester to determine a variety of common application compatibility issues, including file path access, registry use, and memory allocation. AppVerifier assists with several common issues that may be encountered when testing applications for Designed for Windows XP logo status.

Related Links

See the following resources for further information:

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft