Hi,

<J2EEUnit author>
J2EEUnit does support reading web.xml file and I have already used it to
test some struts features. Yuri is absolutely right about his 3 points
(MVC).
</J2EEUnit author>

Thanks.
Vincent.

----- Original Message -----
From: "Shkuro, Yuri" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 22, 2001 5:48 PM
Subject: RE: JUNIT and Struts


> Since Struts is MVC:
>
> 1. Model: put all business logic into beans and use JUNIT as usual to test
> them.
>
> 2. View: you can try using HttpUnit, but it's a pain to test HTML output.
>
> 3. Controller: you can probably use J2EEUnit to test Action classes,
however
> I
>    don't know if they support reading web.xml file, which you would need
in
> order
>    to properly initialize ActionServlet or any extensions of it (e.g., I
am
> using
>    an extension that also depends on some <context-param>'s from web.xml
to
> do
>    application-specific initialization).
>
> Struts 1.1 TODO list contains entries for unit testing framework extension
> to Struts.
>
> YS.
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 22, 2001 11:16 AM
> To: [EMAIL PROTECTED]
> Subject: JUNIT and Struts
>
>
> Hello,
>
> We are using the XP development
process(http://www.extremeprogramming.org/)
> as
> we develop our Struts web application.  We need to write some tests in
> JUnit(http://www.junit.org) to incrementally test as we write code.  Has
> anyone
> ever used JUnit with Struts?  Does anyone have any advice about how to
> proceed
> in coding these tests?
>
> TIA,
>
> Julia
>
>

Reply via email to