JDistUnit

In this section, I will show you the important interfaces and classes within JDistUnit as UML class diagrams. To go directly to the coding level, jump to the programming section.

Classes and Interfaces

To work with JDistUnit, you need to know about two packages: action and agent. The UML class diagram below shows the action package.

JDistUnit action package

This is how it works internally: A ITestThread on a test server calls a ITestAction, which after completion returns a ITestActionResult. During the test action, it is also possible that an exception is thrown, or that the test thread signals a timeout (test actions are recommended to ask the ITestThread regularly whether the action shall be continued).

The second UML class diagram (below) shows the agent package, which brings mobile agent networking to the actions.

JDistUnit agent package

Test cases are specified within your subclass of JDistUnitAgent (an abstract template class implementing the IDistUnitAgent interface, and more importantly, asking you to provide an implementation to the ITestAction interface). Within the agent, all your test code is going into the testAction() method.

Actually running the test agent requires a ITestBox. After connecting to the test servers, you deploy one test agent to all of them and then wait for the results. When all results have returned, you can ask for the number of successes, failures, and for min/max/average access times.

Now that you know about the JDistUnit concepts, you can go into the programming section to get to the coding.