I need to test a complete system that talks to the world entirely by JMS and JAX-WS. The flow, more or less, is this:
- Triggered by a single JMS message,
- Queries a few other external systems (via JMS or webservice).
- Listens for the answers on queues (sometimes for 1 request there are many replies expected).
- Processes what's needed and sends replies back (via JMS) to the calling system (also one or more replies per one triggering message).
I've been searching for a tool that could:
- mock the external systems (that is, listen on other ends of queues, analyze requests and reply based on the contents of the request),
- connect to different message brokers, Active MQ and Websphere MQ being the most wanted,
- create test case logic开发者_运维技巧,
- compare the results with the expected behaviour.
The only thing that comes close so far is jMeter; it lacks only the ability to listen on a queue. Any other ideas? Could be free or commercial.
In the end, it seems to me I'd have to deploy a series of message-driven beans as mocks, but I want to make sure I'm not reinventing the wheel.
SoapUI has native support for testing web services and JMS. If you doesn't like it then build a small test framework using Spring (spring-ws) and activeMQ.
Finally I resorted to writing my own set of MDBs.
Cons:
- much repetitive work,
- not reusable (a dedicated solution to the project),
- missed the possibility to learn a tool that could make my life easier next time,
Pros:
- full control of the test flow,
- ability to deploy it in the target environment (WAS 7) — probably out of the question with SoapUI,
- wrote it in a way that allows developing large test sets in a fast and efficient way.
Some colleagues I asked also recommended this approach. I'm a disappointed I haven't found a better way.
精彩评论