Appendix F. The Swing test client

 

One of the great features of Mule and ServiceMix is testability, which lets you start up a Mule and ServiceMix container from, for example, a piece of Java code or an Ant build file. It’s easy to get the developed message flows running, but what about the next step, flow testing? Because Mule and ServiceMix support a wide variety of connectivity options, there are several ways to test message flows, depending on the choice of connectivity for a specific message flow. For instance, when you use JMS, you can use Hermes JMS (http://www.hermesjms.com) to send a message to a specific queue or topic to trigger the message flow; and you can browse a queue or topic to look for messages arriving at the anticipated destination. You can also use Plain Old Unit Tests (POUT) to trigger a message flow and look for messages at specific endpoints.

This book offers another alternative for testing Mule and ServiceMix flows: the Swing test client. The Swing test client provides a wide variety of connectivity support and an easy-to-use graphical interface. For example, you can send messages to a JMS queue or a file directory and receive messages at their target destination. You need only one tool to support your unit testing.

Starting the Swing test client

Using the Swing test client