Rob Leland wrote:

>   I would like to add some additional Unit tests to the struts
> framework.
>   These would be tests for struts itself, not end user code.
>   My thoughts are that as struts evolves and new functionality
>   is added we want to verify that other functionality is not
>   broken, as code is changed and refactored.
>

I think a unit testing framework would be a wonderful addition to Struts,
and would like to encourage this effort.  As an implementation thought, I
note that Ant already has an optional task to support junit, and would like
to see unit tests for Struts running in some sort of a similar framework
(including contributing a j2eeunit to Ant if that would be useful).

>
>   I am proposing using JUnit 3.5 (http://junit.sourceforge.net/) and
>   J2EEUnit (J2eeunit.sourceforge.org). I am going to force
>   myself to do this in an upcoming project at work, and believe it
>   makes sense to do it in struts also.
>
>   I am targeting the 1.1 release time period. If Unit
>   testing is approved, some small set of tests may make it into
>   the struts 1.0 release, again assuming people here vote for its
>   inclusion.
>
>   My initial thoughts for providing testing is to start with the
>   private methods of struts starting with the
>        struts.action package,
>   then later develop tests for the public methods of struts.action.
>   I didn't want to start another package until I finished the majority
>   of the private methods, only because I would need to debug
>   my unit tests, and only by developing tests for some of the private
>   methods the public could I do this.
>

Doing org.apache.struts.action first makes sense, because it is pretty
central to everything that is Struts, and changes/bugs/regressions/problems
here would have the most impact on users.

>
>   Then other packages would follow :
>     struts.upload,
>     struts.util,
>     struts.digester,
>     struts.actions,
>     struts.taglib.X
>

Others who wanted to start writing tests could, of course, start on other
packages in the order that they preferred.

>
>   In about that order, only because that would be a usefull order for me
>   in the project I am working on. Infact, I only have plans to do
> struts.upload, and
>   struts.util, and doubt I would have the time to produce tests for the
> other packages.
>
>
>   Thoughts ?
>

I'll add a section to the 1.1 TODO list related to this -- I think it is a
great idea.

>
> -Rob

Craig


Reply via email to