jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject RE: Jsp Test Example?
Date Thu, 22 Aug 2002 08:35:47 GMT
Hi Kevin,

Kaarle is completely right, you would test that in the following ways :

- write a pure junit test for your java bean (as they have no
dependencies on the environment). You can also use Cactus if you wish to
have only one framework to set up.
- write cactus unit tests for taglibs (using JspTestCase)
- write cactus unit tests for your servlet controller and other classes
manipulating the servlet api (using ServletTestCase)
- write cactus functional tests for the returned HTML (using the
HttpUnit integration - see web site for details)

Thus Cactus offers you a full solution for unit testing your web
application ! :-)

Hey I will put this as a FAQ ...

Thanks
-Vincent

> -----Original Message-----
> From: Wang, Kevin [mailto:KWang@TMRS.org]
> Sent: 21 August 2002 21:00
> To: 'Cactus Users List'
> Subject: Jsp Test Example?
> 
> Does anyone have an example for testing Jsps? I looked over the
examples
> but
> could not find any.
> 
> The jsp is the view in our model. A servlet would populate the "bean"
> object
> and put in request and forward it to the jsp. The jsp would have the
> following:
> 
> <jsp:useBean id="bean" class="Bean" scope="request" />
> <%@ include file="../another.jsp" %>
> <%= bean.getName() %>
> ...
> 
> How would one test the jsp using Cactus in this case?
> 
> Thanks.
> Kevin
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message