On Fri, Sep 4, 2009 at 9:19 AM, Greg Lindholm<greg.lindh...@gmail.com> wrote:
> You probably should sure the mail archives (on Nabble) as this question come
> up very often.
> In fact it should be in a FAQ but there is some disagreement as what
> constitutes appropriate testing and what methods should be used.
>
> I've written up this article [1] on how to unit test actions in the full
> Struts 2 context with the Interceptor stack and validations.
>
> Others, seem to think this is the wrong approach and this type of testing
> should be done with a tool like Selenium.  Here is the last big thread on
> testing methods [2].
>
> [1] http://glindholm.wordpress.com/2008/06/30/unit-testing-struts-2-actions/
>
> [2]
> http://www.nabble.com/unit-testing-Struts2-application-%28with-Spring-and-Hibernate%29-ts24517800.html
>
> On Fri, Sep 4, 2009 at 3:23 AM, Rusty Wright <rusty.wri...@gmail.com> wrote:
>
>> For example, how can I test the validations if I'm using an xml file with
>> the validation specifications in it?  Seems like there are a lot of moving
>> parts around the invocation of the action classes that make testing hard.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>

Make sure and read through that nabble thread Greg linked to. When
it's all said and done, each project is different and each developer
will have a different notion of how unit testing should be done. Even
though it was a heated argument mostly between Greg and I, I can see
since that thread that people often want this type of functionality
and I'm the kind of guy that isn't going to try to waste cycles trying
to convince everyone... So if you like his approach, go for it. If you
are on the other side of the fence then take a look at selenium or
jwebunit... Either approach will skin the cat, it's up to you and the
other people on your project which method you choose.

-Wes

-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to