users@jersey.java.net

Re: [Jersey] Here is what I want to do (TDD testing with Spring)

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 25 Mar 2009 10:15:37 +0100

On Mar 25, 2009, at 6:42 AM, Imran M Yousuf wrote:

> On Tue, Mar 24, 2009 at 7:58 PM, Mats Henricson <Mats.Henricson_at_paf.com
> > wrote:
>> (Sorry for this Outlook enforced reply - I'm stuck in corporate
>> standards).
>>
>> My objection to this is that I can't see what a web.xml has to do
>> with my
>> JUnit tests?
>>
>> If you work bottom up TDD you deploy in a web container AFTER you
>> know
>> your REST stuff has been tested, as seems to be possible with
>> Grizzly.
>>
>> No?
>>
>
> Yes, but I *MAY* have a web.xml for JUnit testing only and it has
> minimal configuration just to get the REST stuff to fire up and it
> will not be shipped in the REST module, REST Web module will have its
> own web.xml. Another point to adding a web.xml to JUnit test is, IMHO,
> I would also like my web.xml to be part of the test just to ensure
> that it works as expected as well. Also one could take the approach
> mentioned by Paul Sandoz as well. IMO, it depends on the approach you
> take.
>

I would also add that if there is anything we can do to make it easier
for unit testing in various scenarios please log an issue and describe
the use-case.

Paul.