Sun Microsystems 1.2 Telephone Accessories User Manual


 
Chapter 4 Writing Tests 43
While the tests from the application bundle are loaded onto the device by the
AMS, the execution server establishes the sequence in which the tests in the
bundle are run.
5. sendTestResult - The agent returns the test results to the execution server.
Items 3, 4, and 5 repeat until all tests in the application bundle are run. When all
tests in the application bundle are run, the AMS requests the next application bundle
(items 1 and 2) and the sequence is repeated until all tests and all test bundles in the
test suite are run.
Testing Communications or Networking
With Distributed Tests
Distributed tests are a special type of automated tests. Not only do they have a
device side test component, which is executed under the control of a test agent (as
with any regular automated tests), but they also have one or more remote
components on other devices or the Java SE platform side. The distributed test
components have names and communicate with each other by sending messages to
each other by way of a messaging service. The remote components of a distributed
test typically run on a harness host by using a passive agent in the same virtual
machine as the harness and provide some additional functionality needed by the
test. For example, a test verifies that an HTTPS connection can be made to the
remote host. The remote component that runs on the Java SE platform would be an
HTTPS server.
To develop distributed tests, the test writer must write classes for both the client and
remote test components as well as create an appropriate test description file. The
SimpleTestSuite directory contains examples of distributed tests.
Client Test Component
In the MIDP case, the client test component of the distributed test must extend the
com.sun.tck.j2me.services.messagingService.J2MEDistributedTest
class. In the CDC case, the client test component of the distributed test must extend
the com.sun.tck.j2me.services.messagingService.CDCDistributedTest
class.
These are the base classes for distributed tests for the Java ME technology
component of the test. Each component of the distributed test has a unique name
used for identification during message exchange.