Welcome

This is the home page for hUnit, the open-sourced healthcare/ESB/HL7 messaging unit testing framework.

hUnit is a sub-project of the HAPI project, which aims to provide a full featured and open HL7 message parsing library.

What is hUnit?

First, and most importantly, hUnit is a work in progress. hUnit is not yet production-grade software, but that does not mean it isn't yet useful.

hUnit has the fairly simple goal of allowing a developer to write repeatable unit tests for HL7 messaging based applications. It is true that this could be accomplished using hand crafted tests (for instance with JUnit), but hUnit aims to simplify the task:

  • It is multithreaded and asynchronous, allowing for messages to be transmitted to one interface at the same time as messages are being received by another.
  • It uses XML to represent tests and has a UI for editing tests, allowing non-java developers to develop good unit tests. This also means that test files can be edited by hand. hUnit also allows you to execute your tests in an automated way using JUnit 3 or 4.
  • It aims to be as flexible as possible. Currently only HL7-in-HL7-out verification is possible, but much more should be possible soon. We'd love to hear what you think might be useful.

What's New?

November 21, 2009

hUnit 0.3 has been released! This release introduced the Swing based GUI for hUnit. See the screenshots page for details.

October 7, 2009

A new release has been posted to Sourceforge. This release features support for JMS queues and topics, XML messages, and interfaces which are not supposed to receive any messages (i.e. if filters are being tested, or a dead letter queue exists for errors). This release also adds support for running tests in JUnit 3 and JUnit 4.

See the cookbook page to see how to use these features.

Work on a UI for designing tests (avoiding the need to hand craft XML files) is now beginning.

What's next?

hUnit has several features being planned for future releases. If you are interested in helping out with one of them, we'd love to hear from you!

  • A swing-based UI for displaying test batteries in progress as well as for displaying exact interface messaging details and a nice diff view for incorrect messages.
  • Support for programatic logic in tests, for times when XML declaration isn't powerful enough. This might allow embedded Java code, or possibly a scripting language such as groovy.
  • Support of many other models of interaction other than simple HL7-in-HL7-out. Need to send a message to an application and verify that a database is updated? Need to listen to a JMS queue or simulate a web service call? We hope to support these things too. If you need something new, maybe you can help out!
  • hUnit's multithreaded design should be a good fit for load testing scenarios. We aim to provide facilities for auto-generating messages using templates of some sort (not sure how yet) to provide effective load testing.

Getting Started

To get started using hUnit, see the cookbook.

Contacting Us

We'd love to hear from you! If you have ideas, want to help, or anything else, please contact James Agnew at jamesagnew@users.sourceforge.net.