You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Michael Kelly <mi...@lady.axian.com> on 2001/03/03 23:58:26 UTC

Re: Interface testing

I've been using JUnit to test the form and action objects (which required
creating response, request, and servlet stubs for the perform method of
the action object).  Then I use HTTPUnit for the interface testing.

-=michael=-

======================================================================
 Michael S. Kelly                           ____       _
 Axian, Inc.                                 // |_  __(_) ___  _ __
 4800 SW Griffith Dr., Ste. 202             //| |\\/ /| |/ _ \| '_ \
 Beaverton, OR  97005 USA             _____//_| | / / | | |_| | | | |
 Voice: (503)644-6106 x122           ((   //  |_|/_/\\|_|\_/|_|_| |_|
 Fax:   (503)643-8425                 ``-''          ``-''
 http://www.axian.com/               Software Consulting and Training
 mailto:michaelk@axian.com
 Axian mailto:info@axian.com
======================================================================

On Sun, 4 Mar 2001, Zach Thompson wrote:

> Hello,
> 
> Does anyone have suggestions about how to test the user interface of
> a Struts application before the backend (Action and ActionForm)'s have been
> implemented?
> 
> I'm having trouble separating development of the UI from the backend.  It
> seems like we spend too much time going back and forth trying to get the 
> jsp and all the Struts tags to interact well with the Action's.  Sometimes
> the UI is unstable or untestable until something on the backend is fixed.  I
> think my development process is broken...
> 
> xmlc from Enhydra (enhydra.org) was one approach I looked at, and I like 
> the concept of mocking up the entire site up in html before code is
> written.  We have found that use tests can lead to major re-designs of
> the backend (especially when the use tests are conducted by clients).
> Ideally, I'd have the UI and the backend be two separate, independently
> functioning units that can implemented and tested at different times by
> different groups and plugged together.
> 
> Do I need to create Action and ActionForm stubs to use for testing?  Is 
> there something that could be integrated into Struts to help with this?
> Maybe have a setting in struts-config.xml that allows jsp's to run even
> if there are errors in Struts tags (beans not found, etc.)?
> Or, am I just going about this all wrong?
> 
> Thanks so much,
> 
> Zach
> 


Re: Interface testing

Posted by Zach Thompson <za...@mthoodmedia.com>.
Thanks - I think JUnit will help a lot to improve my development process.

I'm still interesting in hearing about techniques people use to separate
the design of the UI (jsp pages) from the backend implementation 
(Action classes).  Currently, I have to write ActionForm's and Action's 
so the jsp pages don't get exceptions.  I'd like to be able to decouple
these two separate phases of development as much as possible...

Zach

Michael Kelly wrote:
> I've been using JUnit to test the form and action objects (which required
> creating response, request, and servlet stubs for the perform method of
> the action object).  Then I use HTTPUnit for the interface testing.
> 
> -=michael=-
> 
> ======================================================================
>  Michael S. Kelly                           ____       _
>  Axian, Inc.                                 // |_  __(_) ___  _ __
>  4800 SW Griffith Dr., Ste. 202             //| |\\/ /| |/ _ \| '_ \
>  Beaverton, OR  97005 USA             _____//_| | / / | | |_| | | | |
>  Voice: (503)644-6106 x122           ((   //  |_|/_/\\|_|\_/|_|_| |_|
>  Fax:   (503)643-8425                 ``-''          ``-''
>  http://www.axian.com/               Software Consulting and Training
>  mailto:michaelk@axian.com
>  Axian mailto:info@axian.com
> ======================================================================
> 
> On Sun, 4 Mar 2001, Zach Thompson wrote:
> 
> > Hello,
> > 
> > Does anyone have suggestions about how to test the user interface of
> > a Struts application before the backend (Action and ActionForm)'s have been
> > implemented?
> > 
> > I'm having trouble separating development of the UI from the backend.  It
> > seems like we spend too much time going back and forth trying to get the 
> > jsp and all the Struts tags to interact well with the Action's.  Sometimes
> > the UI is unstable or untestable until something on the backend is fixed.  I
> > think my development process is broken...
> > 
> > xmlc from Enhydra (enhydra.org) was one approach I looked at, and I like 
> > the concept of mocking up the entire site up in html before code is
> > written.  We have found that use tests can lead to major re-designs of
> > the backend (especially when the use tests are conducted by clients).
> > Ideally, I'd have the UI and the backend be two separate, independently
> > functioning units that can implemented and tested at different times by
> > different groups and plugged together.
> > 
> > Do I need to create Action and ActionForm stubs to use for testing?  Is 
> > there something that could be integrated into Struts to help with this?
> > Maybe have a setting in struts-config.xml that allows jsp's to run even
> > if there are errors in Struts tags (beans not found, etc.)?
> > Or, am I just going about this all wrong?
> > 
> > Thanks so much,
> > 
> > Zach
> > 
>