开发者

Tools for functional testing a Java EE application with message-driven beans and web services

开发者 https://www.devze.com 2023-04-01 01:59 出处:网络
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:

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:

  1. Triggered by a single JMS message,
  2. Queries a few other external systems (via JMS or webservice).
  3. Listens for the answers on queues (sometimes for 1 request there are many replies expected).
  4. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消