You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by Gordon Dickens <gd...@anexinet.com> on 2007/10/04 12:33:55 UTC
Testing Service Units with JUnit
Hello,
I would like to write a JUnit class that will test my service units
without ServiceMix running outside of the JUnit test. Is there an
example of being able to send in a message and be able to test the
outcome without starting ServiceMix outside the JUnit test?
Currently I am writing the service unit, package it in the service
assembly, then deploy it to the running ServiceMix, then test. This is
very time consuming and doesn't provide the automated test execution
possibility for testing the service independently.
Any help is appreciated.
Thanks,
Gordon
Re: Testing Service Units with JUnit
Posted by Guillaume Nodet <gn...@gmail.com>.
For service unit, you can do junit tests easily (see [1] for a example).
James has recently worked on providing the needed informations so that
you can junit SA too (see [2]) but this is only available in
servicemix 3.2.
[1] http://fisheye6.cenqua.com/browse/servicemix/branches/servicemix-3.1/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/HttpXBeanDeployerTest.java?r=579576
[2] http://fisheye6.cenqua.com/browse/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/resources/integrationTest.xml?r=579503
On 10/4/07, Gordon Dickens <gd...@anexinet.com> wrote:
> Hello,
>
> I would like to write a JUnit class that will test my service units
> without ServiceMix running outside of the JUnit test. Is there an
> example of being able to send in a message and be able to test the
> outcome without starting ServiceMix outside the JUnit test?
>
> Currently I am writing the service unit, package it in the service
> assembly, then deploy it to the running ServiceMix, then test. This is
> very time consuming and doesn't provide the automated test execution
> possibility for testing the service independently.
>
> Any help is appreciated.
>
> Thanks,
> Gordon
>
>
>
--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/