xHopper Test Tool QuickStart Guide

4/7/2010

Enrique Moreno, Jenna Lee, Microsoft Corporation

May 2008

The xHopper tool, like Hopper, can help you identify application defects earlier in the development cycle, making them easier to fix and creating a more stable base on which to build the rest of your application. xHopper provides new functionality that is not available in Hopper and is intended to be used in conjunction with Hopper, not as a replacement for it.

Windows Mobile 6.5

xHopper is a software test tool that simulates input stress on Windows Mobile devices and triggers actions that execute applications at a random time or at fixed time cycles. Unlike the test tool Hopper, xHopper does not send keystrokes and screen taps in a random fashion. Instead, it forces screen rotations and fake RIL notifications, such as incoming phone calls, text messages, and voice messages, at user-specified intervals. Hopper and xHopper can quickly isolate troublesome scenarios and find bugs in your applications.

It is very important to begin Hopper and xHopper testing early in your development cycle because application defects that are detected early in the development cycle are easier to fix and, therefore, provide a more stable base on which to build the rest of your application. Sometimes, the bugs that are detected by Hopper and xHopper are difficult to investigate and fix, but the value of investigating these bugs should not be underestimated. Hopper and xHopper can help you identify system and application scenarios that you may not have thought of and help you improve the stability of the device as a whole.

The power of xHopper lies in its ability to enable you to find new scenarios that Hopper will not find by itself.

Configuring xHopper

All of the configuration settings are specified as command prompt parameters. For example, if you want to execute the parameter /rotate every 10 seconds, send the following parameter to xHopper: /rotate 10. This rotates the screen every 10 seconds. If you want to rotate the screen at a random time, provide two integers and then the rotation will be executed at a random time between those two numbers. For example, /rotate 10 20, rotates the screen at a random time between 10 and 20 seconds. We can picture this in a timeline, where the first random number xHopper picks is 15, which means that the first rotation will happen at second #15. If the second random number that xHopper picks is 10, the second rotation will happen at second 25, which is 10 seconds past the first rotation at second #15 and so on.

The parameters (time and actions) can be executed in any order. They are case insensitive and receive either one or two values, depending upon whether you want to execute in a fixed cycle of time or with a random time cycle.

Running xHopper

xHopper is a single, executable file that is found in the C:\Program Files\Windows Mobile 6.5.3 DTK\Tools\xHopper directory.

  1. Copy Xhopper.exe and Qa.dll to the root folder of your device. If you want to use the fake RIL capabilities of xHopper on an actual device (not on a CEPC or DE), you can apply FakeRIL.cab (or Fakeril.dll and Frinterface.dll) on your device. Note that many features, such as a fake incoming phone call, text message, or voice message, do require fakeRIL to work properly.
  2. xHopper is a command prompt tool that does not have a user interface; therefore, there are different ways you can run this tool. The following are some examples of this:
    1. If your device is attached to an instance of Platform Builder, you can use the Target Control window and type: s xHopper.exe /rotate 5 (or any additional parameter that you want.)
    2. If your device is attached through ActiveSync, you can use RapiStart.
    3. You can create a .lnk file, and copy it to the \windows\Start menu folder. This file should execute xHopper and include all the parameters that you want to include.

After the desired parameters have been specified and xHopper executed, the tool will begin to stress the device. There will be a log file, xResults.txt, which will be located in the device’s root directory. This log file represents a periodic snapshot of the system and is useful for debugging.

The following table shows some useful commands.

Command Description

/t runTime

Set the amount of time xHopper is to be run.

The /t option is used to specify how many minutes you want xHopper to run. If this parameter is not specified, xHopper will run for 30 hours by default.

There is only one parameter, and it receives only one integer.

Example: xHopper [/t runTime]

/execute <myApplication> [myParameters] (lowBound, highBound) | fixedTime

Set a type of action or any additional application that you want to run.

You can launch applications periodically during the time xHopper is running by using the /execute parameter. It uses the following form:

/execute "application" "application’s parameters"

You can set the execute parameter to be launched by using a fixed or random time cycle, just as you can with the other parameters.

The following are examples of how to use the execute parameter:

/execute "\windows\wmplayer.exe" 5

This will run Wmplayer.exe every 5 seconds.

/execute "\windows\iexplore.exe" "http://www.msn.com" 5

This will run Iexplore.exe and send http://www.msn.com as a command parameter to Iexplore.exe every 5 seconds.

/execute "\windows\iexplore.exe" 10 20

This will run Iexplore.exe by using a random time between 10 and 20 seconds.

/rotate (lowBound, highBound) | fixedTime

Trigger a screen rotation at either a fixed cycle of time or with a random cycle. If the choice is a random cycle, a value is chosen randomly from the lower and higher bound values given.

/phonecall (lowBound, highBound) | fixedTime

Simulate (that is, "fake") an incoming phone call by using fakeRIL.

/sms (lowBound, highBound) | fixedTime

"Fake" an incoming SMS message by using fakeRIL.

/vmail (lowBound, highBound) | fixedTime

"Fake" an incoming voice message by using fakeRIL.

/signalstrength (lowBound, highBound) | fixedTime

"Fake" a change in the signal strength by using fakeRIL.

Examples of xHopper Usage

This list shows some examples of how to use xHopper:

  • Rotate the screen every 10 seconds for one hour.
    xHopper /t 60 /rotate 10
  • Execute an application every 5 minutes for one day.
    xHopper /t 1440 /execute "\windows\covtool.exe" "/save /all" 300
  • Execute at a random time during 30 hours.
    xHopper /t 1800 /rotate 2 10 /phonecall 60 120 /sms 20 60 /vmail 20 60

Can I focus on a specific application?

You can stress your application, in particular, by using the /execute parameter in xHopper. This will run your application and bring it to the foreground. We recommend that you don’t launch the application very often (every 10 to 60 seconds is all right). By not overdoing the stress on your application, you stress the entire device ecosystem, with a slight emphasis on your application, in order to get the most benefit from xHopper.

How can I reproduce xHopper runs?

Given the random nature of Hopper and xHopper, there is no way to reproduce a run. Running stress frequently will increase your chances of finding incidences of the same crash; however, there is no guarantee that you will be able to do so.

Can I stop xHopper?

You can stop xHopper by making use of the kp command in Platform Builder or by using the task manager on your device.

Using xHopper can help you improve the stability of your applications.

Show: