5.Check or Send Message- The test sends either a message or a check message request to the Framework messaging service on the harness.

6.Get Message - The Framework messaging service on the harness sends the test a get message command.

7.Check or Send Message - The server-side test sends either a message or a check message request to the Framework messaging service on the harness.

8.Get Message - The Framework messaging service on the harness sends the server-side test a get message command.

9.sendTestResult - The agent returns the test result to the execution server.

The agent repeats items 3, 4, and 9 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 User Interfaces With Interactive Tests

Interactive tests are the tests that require some form of user interaction and cannot be executed without such interaction. From a design point of view, interactive tests are a subtype of distributed test. As a subtype of distribute test, interactive tests generally execute on the test device under the control of a component called an agent. However, unlike distributed tests, interactive tests also require some form of user interaction as a part of the test. Interactive tests might require that the user change something with a device, which triggers event generation or require the user to verify that a device plays sound or vibrates. But most typically, interactive tests are used to validate user interface on the device.

The Framework supports the following three types of interactive modes:

Yes-No- The user must determine the outcome of the test.

Done - The user must perform specific actions and confirm the completion, but cannot affect the outcome of the test.

Information-only- The visual component is presented to the users, but no user action is required (this is the default mode).

To develop interactive tests, the test writer must write classes for both the client and the remote test components of the interactive test as well as create an appropriate test description file. The AdvancedTestSuite directory contains examples of interactive tests.

48 Java ME TCK Framework Developer’s Guide • July 2007

Page 68
Image 68
Sun Microsystems 1.2 manual Testing User Interfaces With Interactive Tests