Simplifying JMS testing with embeddable brokers

Ever hoped for an easy way to run embed brokers and simulate a full cycle JMS messaging cycle? Well, this pet project of mine may be useful for you (or, at least, give you an idea for an implementation). It works on top of JUnit, by providing a JUnit test runner, a JMS provider, a set of JMS-related annotations that will inject object instances and additional utility classes to simplify dealing with JMS. At the moment it works only with ActiveMQ, but adding additional providers should be fairly easy.

Here’s example of the a test class that sends and receives data through an embeddable ActiveMQ broker:

It’s pretty simple as of now, but I can see some interesting uses for running certain types of tests.

You can find the project page here.

Published by

Otavio Piske

Just another nerd

One thought on “Simplifying JMS testing with embeddable brokers”

Leave a Reply

Your email address will not be published. Required fields are marked *