You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by tech_user_nj <sy...@hbo.com> on 2009/07/09 18:34:53 UTC

Re: suggestion: package some test classes in a 'mock' jar?

We are using CXF Rest services and would like to test 'out of container' unit
testing. I came across couple of classes like AbstractCXFTest etc as part of
the API but do have any sample junit test cases? This will reduce my effort
of writing these unit test cases. Your help is highly appreciated.

Thanks



dkulp wrote:
> 
> On Tuesday 17 July 2007 06:55, Benson Margulies wrote:
>> I'm about to borrow AbstractCXFTest and a subclass or two to set up
>> test of my own service. It occurs to me that you all could package a
>> jar file with the contents of org.apache.cxf.test and the generally
>> useful pieces of AbstractAegisTest. Spring does something like this
>> with the 'mock' jar, no?
> 
> cxf.test is already in a jar.   That's right in cxf-core since we did 
> think that would be very useful.
> 
> We do have the cxf-testutils jar which contains a BUNCH of stuff that we 
> use for testing various parts.   There are really two interesting things 
> in there:
> 
> org.apache.cxf.testutil.common:
> This package has base classes for our client/server system tests.   There 
> are utilities for launching servers in forked processes, etc....
> 
> rest of stuff:
> There are a BUNCH of pre-generated services that we use to test things.  
> Doc/lit, wrapped, rpc, xml binding, soap, mtom, etc... are all in there.
> 
> That said, it's definitely target completely at JAX-WS/JAXB test cases, 
> not Aegis.
> 
> That said, if you want any of the other "test" jars created and deployed, 
> let me know.   I can easily add them to the builds so they get deployed 
> with each snapshot/release.    For example, the systest jar is done that 
> way.   From maven, you can easily depend on them by setting a "test" 
> classifier (not scope) on the dependency in Maven.
> 
> -- 
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727    C: 508-380-7194
> daniel.kulp@iona.com
> http://www.dankulp.com/blog
> 
> 

-- 
View this message in context: http://www.nabble.com/suggestion%3A-package-some-test-classes-in-a-%27mock%27-jar--tp11647061p24413464.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: suggestion: package some test classes in a 'mock' jar?

Posted by tech_user_nj <sy...@hbo.com>.
Hello again,

Let me add one more item. Do you have any recommendation for testing CXF
Rest services? Jetty vs Mocks etc? Please include this information in your
user guide as I see developers spend hours testing some simple services. 

Thanks,



tech_user_nj wrote:
> 
> We are using CXF Rest services and would like to test 'out of container'
> unit testing. I came across couple of classes like AbstractCXFTest etc as
> part of the API but do have any sample junit test cases? This will reduce
> my effort of writing these unit test cases. Your help is highly
> appreciated.
> 
> Thanks
> 
> 
> 
> dkulp wrote:
>> 
>> On Tuesday 17 July 2007 06:55, Benson Margulies wrote:
>>> I'm about to borrow AbstractCXFTest and a subclass or two to set up
>>> test of my own service. It occurs to me that you all could package a
>>> jar file with the contents of org.apache.cxf.test and the generally
>>> useful pieces of AbstractAegisTest. Spring does something like this
>>> with the 'mock' jar, no?
>> 
>> cxf.test is already in a jar.   That's right in cxf-core since we did 
>> think that would be very useful.
>> 
>> We do have the cxf-testutils jar which contains a BUNCH of stuff that we 
>> use for testing various parts.   There are really two interesting things 
>> in there:
>> 
>> org.apache.cxf.testutil.common:
>> This package has base classes for our client/server system tests.   There 
>> are utilities for launching servers in forked processes, etc....
>> 
>> rest of stuff:
>> There are a BUNCH of pre-generated services that we use to test things.  
>> Doc/lit, wrapped, rpc, xml binding, soap, mtom, etc... are all in there.
>> 
>> That said, it's definitely target completely at JAX-WS/JAXB test cases, 
>> not Aegis.
>> 
>> That said, if you want any of the other "test" jars created and deployed, 
>> let me know.   I can easily add them to the builds so they get deployed 
>> with each snapshot/release.    For example, the systest jar is done that 
>> way.   From maven, you can easily depend on them by setting a "test" 
>> classifier (not scope) on the dependency in Maven.
>> 
>> -- 
>> J. Daniel Kulp
>> Principal Engineer
>> IONA
>> P: 781-902-8727    C: 508-380-7194
>> daniel.kulp@iona.com
>> http://www.dankulp.com/blog
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/suggestion%3A-package-some-test-classes-in-a-%27mock%27-jar--tp11647061p24414005.html
Sent from the cxf-user mailing list archive at Nabble.com.