C H A P T E R  2

Setting Up the Developer’s Kit

This chapter describes the steps you need to take before writing a test pack. These steps verify that your environment is set up so that tests can be built and tested. It has these sections:


Acquire and Install the Prerequisite Software

To develop a test pack, you must first acquire and install the following software:

> java -version



Note - To write and test a test pack, you must have a private copy of the full administrator installation, including the Central Installation and the Sun Java System Application Server. To prevent interference with testers and administrators, do not use the production installation for test development. To avoid confusion with the Central Installation that testers use to run tests, this guide refers to your private Central Installation as the Developer Installation.


> ant -version

Note these operating system-specific requirements:

Version 2.1_01 of the Wireless Toolkit cannot be installed with JDK version 1.6.0_03, which is recommended for the Java Device Test Suite. Specify a JDK version in the 1.4 or 1.5 series when you install the WTK on the Solaris platform.

To obtain the latest preverifier, also download and install on a Windows platform version 2.5 of the Sun Java Wireless Toolkit for CLDC from http://java.sun.com/products/sjwtoolkit/. This guide refers to the installation directory as winWTKInstallDir. Copy winWTKInstallDir/lib/jsr082.jar to WTKInstallDir/lib/.

Solaris platform developers can use JAR files created on the Windows platform because they are platform independent.


Unzip and Configure the Developer’s Kit

The developer’s kit is packed into installDir/admin/shared/devkit.zip. Prepare it for use by following these steps:

1. Create a directory in which you want to develop your test pack.

This guide refers to the directory you create as devKitHome.

2. Unzip installDir/admin/shared/devkit.zip into devKitHome.

3. Open devKitHome/tests/common/build/environment.properties in a text editor.

4. Verify that jdts.home is set to installDir. Change the value if necessary.

5. Solaris operating system users, skip to Step 7.

6. Windows operating system users:

a. Set client.platform.home to the directory containing the Wireless Toolkit for CLDC, for example, c:/WTK25.

Note the forward slash path separator.

b. Skip to Step 8.

7. Solaris operating system users:

a. Set client.platform.home to WTKInstallDir, the directory containing the Wireless Toolkit, for example, /home/lee/bin/WTK21.

b. Remove .exe from the end of the following line:

preverify.exec=${client.platform.home}/bin/preverify.exe

8. Save environment.properties.


Build and Install the Sample Test Packs

Building and installing the sample test packs verifies that your developer’s kit installation is ready for test pack development. Follow these steps:

1. If it is not running, start the Relay by starting the Sun Java System Application Server.

The Java Device Test Suite Administration Guide describes how to start the Relay.

You can verify that the Relay is running by typing a URL like this into a web browser: http://appServerHost:appServerPort/appContext/

For example: http://localhost:8080/JdtsServer/. You specified the values of appServerHost, appServerPort, and appContext when you installed your developer installation.

If the Relay is running, it displays a page similar to FIGURE 2-1. The version number and other details might be different.

FIGURE 2-1 Relay is Running Page


Relay is Running Page

2. In a terminal or command window, change to devKitHome/tests/.

3. Run this command:

ant -f demo.xml

The command can take several minutes to run. It produces hundreds of lines of console output.

4. When the command completes, launch the graphical administrator harness and verify that test tree shows the Developer test packs shown in FIGURE 2-2.

FIGURE 2-2 Administrator Harness with Developer Test Packs Installed


Administrator Harness with Developer Test Packs Installed