开发者

Simulating JMS - jUnit

开发者 https://www.devze.com 2023-02-15 10:00 出处:网络
I need to simulate JMS behavior while performing automated tests via maven/hudson. I was thinking about using some mock framework i.e. Mockito to achieve that goal but maybe there is some easier tool

I need to simulate JMS behavior while performing automated tests via maven/hudson. I was thinking about using some mock framework i.e. Mockito to achieve that goal but maybe there is some easier tool which can accomplish this task? I have read a little bit about ActiveMQ but from what I have fo开发者_JAVA百科und out it requires to install broker prior using it. In my case it is important to have everything run by maven only because I don't have any privileges to install anything on the build server.


You can run ActiveMQ in embedded mode - the broker starts within your application and queues are created on the fly. You just need to add activemq.jar and run few lines of code.

On the other hand there is a Mockrunner library that has support for JMS - although it was designed mainly for unit tests, not integration.

0

精彩评论

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