Client Test Component

The client test component of the interactive test must extend the MidDistribInteractiveTest class. This is the base class for distributed interactive tests and extends the

com.sun.tck.j2me.services.messagingService.J2MEDistributedTest class. The MidDistribInteractiveTest class provides all of the common interfaces required by distributed interactive tests (such as setFormTitle, waitForMessage, messageReceived, addStatus, and cleanUp).

The client test component must call the send and handleMessage methods in the MidDistribInteractiveTest class to send and receive messages to or from the other components of the interactive test group.

The following directory contains an example of a client test component (MidDistribInteractiveTest.java):

AdvancedTestSuite/src/share/classes/com/sun/tck/midp/lib/

Remote Test Component

The remote test component of the interactive test must extend the com.sun.tck.midp.lib.DistribInteractiveTest class. The DistribInteractiveTest class is the base class for the Java Platform, Standard Edition (Java SE platform) technology component of the interactive test. It is a subclass of the J2SEDistributedTest class that requires user action before a test result is determined. The remote test component must invoke the send method to exchange messages from the client test components.

A remote test component usually contains the information that is displayed by the harness (such as the test instruction, expected image, or the pass-fail messages for the test cases).

Test Description for Interactive Tests

Like distributed tests, the test description file for the interactive test must contain the distributed keyword and the remote attribute. In addition, interactive test description files must also contain the interactive keyword.

See remote Attribute” on page 44 for a description and example of the remote attribute.

Chapter 4 Writing Tests 49

Page 69
Image 69
Sun Microsystems 1.2 manual Client Test Component, Test Description for Interactive Tests