Partager via


Hopper Test Tool

4/8/2010

Hopper is a software test tool that simulates input stress on Windows Mobile devices. Hopper will stress all applications that are available through the menu system by rapidly sending keystrokes and screen taps in a random fashion. By sending a large number of user inputs very rapidly, Hopper can quickly isolate troublesome scenarios and find bugs in your applications.

Hopper for application developer use is just like Hopper for OEM use; the only difference is the addition of the Focus Application (FocusApp), which is customized to keep the intended application in the foreground. As an application developer, you are generally not concerned with other applications that are installed on the device, so keeping Hopper focused on your application is critical. When your application is in the foreground, Hopper will test only your application and not the rest of the system. FocusApp is needed to bring your application back to the foreground if Hopper tries to navigate away from it.

It is very important to begin Hopper testing early in your development cycle, as application defects found early in the development cycle are easier to fix and provide a stable base to build the rest of your application. Sometimes, bugs found by Hopper are very difficult to find and fix, but their value should not be underestimated. Hopper will help you find system and application scenarios that you may not have thought of.

The power of Hopper lies in its ability to very rapidly send random inputs to the system. This ability is also what makes Hopper debugging challenging, since it is often difficult to find simple user reproductions.

The Focus Application

Before you run Hopper, you will need to customize FocusApp, build it, deploy it to the device, and run it. At minimum, g_pszAppName must be changed to represent the name of your application. You can also change the SLEEP_TIMEOUT variable; this variable controls how often your application is brought up. These variables can be customized to fit a variety of scenarios, such as creating a more exclusive run by reducing the SLEEP_TIMEOUT variable (then, Hopper will bring up your application more often).

In addition, you can perform more complex customizations such as setting up FocusApp to test multiple executables at the same time; though, these types of customizations may require more code than simply customizing the above two variables.

Note

The included FocusApp sample is set up to keep Media Player in the foreground. You are free to compile the sample and run it with Hopper to see how Media Player is stressed, but you will need to customize it to work with your own applications. Also, Hopper was designed to test the entire system and not just a single application, so don't be surprised if you see Hopper in other applications. The intent of FocusApp is to reduce this amount of "wandering".

How to Run Hopper

Hopper is a single executable file that is found in the C:\Program Files\Windows Mobile 6.5.3 DTK\Tools\Hopper directory. Copy the executable to the root folder of your device. Also, copy your customized FocusApp binary to the device. Then, follow the following steps:

  1. Launch the file explorer on the device
  2. Navigate to the root folder
  3. Launch FocusApp
  4. Dismiss your application, or press the BACK key to return to the file explorer
  5. Launch Hopper

Hopper will begin to click, and soon, your application will come into focus. There will be a log file, Hopper.log, written under the \testlog directory; this log file represents a periodic system snapshot, and may be useful for debugging.

Additional Resources

A web blog dedicated to solving Hopper problems can be found at this Microsoft Web site.

See Also

Other Resources