You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Allison, Bob" <ro...@qwest.com> on 2006/02/06 14:04:21 UTC

OT: Servlet 2.4/JSP 2.0 Testing

Does anybody know of a means to do unit testing of web servlets which
are coded to the Servlet 2.4 specification and JSPs coded to the JSP 2.0
specification?  Cactus doesn't seem to be there yet in any release I
could find and I have been unable to build Cactus in a manner which
would provide this capability (although it looks like it might be
partially present).  I asked this question on the Cactus user list and
have not gotten any responses so I thought I would try here and see if
any Maven users have done anything like this.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: OT: Servlet 2.4/JSP 2.0 Testing

Posted by Fabrizio Giustina <fg...@apache.org>.
On 2/6/06, Allison, Bob <ro...@qwest.com> wrote:
> Does anybody know of a means to do unit testing of web servlets which
> are coded to the Servlet 2.4 specification and JSPs coded to the JSP 2.0
> specification?

I suggest to try Httpunit, and expecially ServletUnit: you can run
your tests out-of-container, with the ability to make your jsps
compiled by an embedded tomcat (jasper) engine.
You can find lots of examples on how to setup tests and maven
dependencies (expecially for jsps) in the displaytag source code at
http://cvs.sourceforge.net/viewcvs.py/displaytag/displaytag/src/test/

fabrizio

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Servlet 2.4/JSP 2.0 Testing

Posted by Vincent Massol <vm...@pivolis.com>.
Hi Bob,

> -----Original Message-----
> From: Allison, Bob [mailto:robert.allison@qwest.com]
> Sent: lundi 6 février 2006 14:04
> To: Maven Users List
> Subject: OT: Servlet 2.4/JSP 2.0 Testing
> 
> Does anybody know of a means to do unit testing of web servlets which
> are coded to the Servlet 2.4 specification and JSPs coded to the JSP 2.0
> specification?  Cactus doesn't seem to be there yet in any release I
> could find and I have been unable to build Cactus in a manner which
> would provide this capability (although it looks like it might be
> partially present).  I asked this question on the Cactus user list and
> have not gotten any responses so I thought I would try here and see if
> any Maven users have done anything like this.

AFAIK Alexander is working on a Cactus m2 plugin. Also you should be able to
use the Cactus cactifywar goal using the Antrun m2 plugin. Then you can use
the Cargo plugin to start/stop/deploy the cactified war.

You could try binding the cactification to the pre-integration-test phase
and then bind cargo:start also in the same phase (but define after so that
the order is preserved). One issue will be that the current surefire plugin
has no goal to run junit tests in the integration-test phase... 

But at least this is how I think it could be supported easily.

Thanks
-Vincent


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org