[ http://jira.codehaus.org/browse/MNG-635?page=comments#action_43302 ] 

Rod Coffin commented on MNG-635:
--------------------------------

I think that it is important for Maven to provide a facility to unit test all 
parts of an application including view components such as servlets.  For me 
what distinguishes unit testing form integration testing is the ability to 
isolate components from the rest of the system and I can see a lot of value in 
testing web components in isolation from the rest of the system.  And with the 
importance descriptors play in the correct functionality of an application 
bring them under the unit test umbrella is important as well.  That is why I 
would like to do this in the unit phase instead of integration test phase.

I see your point about the implementation I submitted in the patch though.  Is 
there a way that we can make webapp resources available in the test classpath 
and not necessarily on the runtime classpath?  I would be happy to work on a 
better patch if you could point me in the right direction.

> Webapp Resources Not Available to Unit Tests
> --------------------------------------------
>
>          Key: MNG-635
>          URL: http://jira.codehaus.org/browse/MNG-635
>      Project: Maven 2
>         Type: Bug
>   Components: maven-plugins
>     Versions: 2.0-beta-1
>  Environment: Maven version: 2.0-beta-1-SNAPSHOT
> Windows XP
> java version "1.5.0_02"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09)
> Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed mode, sharing) 
>     Reporter: Rod Coffin
>     Priority: Blocker
>  Attachments: MNG-635.txt
>
>
> Unit tests that depend on resources in the webapp directory fail because 
> those resources are not available during the test phase.  This makes it 
> impossible to write tests using tools like HttpUnit that rely on information 
> in web.xml file:
> Ex:
> InputStream webXML = 
> GreeterServlet.class.getResourceAsStream("/WEB-INF/web.xml");
> ServletRunner sr = new ServletRunner(webXML);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to