This document describes how to run the unit tests in the ViperTest midlet. The tests are meant to be run on the emulator, but many tests can also be run on a real device.

The following steps assume that you already have a working S60 environment including the Java location component.

* Step 1: Build the midlet.

Use the build.bat script in the ViperTest\bin folder (You may need to edit some variables).

The script will also copy the ViperTest-SimPsy.sps simulation data for the simulation PSY to the correct location.


* Step 2: Build ViperTestPsy.

Go to the ViperTestPsy\group folder and build it with bldmake and abld.


* Step 3: Prepare the environment.

Run the rmlmdb.bat script to remove any existing landmark databases.

Start the emulator. Start the location configuration applet. Enable the ViperTest PSY and Simulation PSY. Disable all other methods.

Select the Simulation PSY method and change the configuration to use the ViperTest-SimPsy.sps file.


* Step 4: Run the midlet.

There are two different unit tests, "LocationProvider tests" and "tests for the other classes".

Choose "Run tests" to run the "fast" unit tests (takes about 30 seconds).

Choose "Run LP tests" to run the LocationProvider tests (takes about 2 minutes). You will also be asked to disable all the PSYs. This is done in the location configuration applet.