Ted,

1)
How do you implement the Action Adapter?  Derived from Action and make it composite a 
substential Action Adaptee object which know nothing about web stuff? If this is the 
case, I want to know what the Action Adaptee's execute() return?  Actually, I want to 
know if or not the Action Adaptee get knowledge of forwarding.  Thanks.

2)
I think I like the WebTest.  Before use it, I still want to get some opinion from you 
about how do you compare WebTest and HttpTest.  Thanks in advance.


----- Original Message ----- 
From: "Ted Husted" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, October 29, 2003 6:59 PM
Subject: Re: Unit Test Actions


> StrutsTestCase includes a set of mock classes (that we *really* should 
> integrate into the core) that work without Cactus and another set that 
> work with Cactus. The fork takes places at the highest level, so you can 
> start with one and then switch to the other, if need be.
> 
> With StrutsTestCase, you can write some very fine-grained tests against 
> the Struts configuration. I'm not aware of any other tool that works in 
> the same way.
> 
> Though, in my own work now, I tend to write standard JUnit tests against 
> the business layer, and then use Canoo WebTest 
> <http://webtest.canoo.com/> against the web layer.
> 
> But, that's because my actions have devolved to adapters, and so there 
> less and less to test at this level. Though, I do think we should be 
> using StrutsTestCase to prove that the standard Actions work as expected.
> 
> The nice thing about WebTest is that it runs against the actual pages, 
> and it is quite agile. It's driven by a XML document that any savvy 
> person can maintain, including page designers. You have to have the 
> server running, but it is a very light tool and the tests run quickly. 
> No server-side configuration is required, and it's not Java or JSP 
> specific. You can write Webtests against a HTML storyboard (or 
> "wireframe"), so that you are test-driven from square one. Good stuff!
> 
> HTH, Ted.
> 
> 
> Steven Woody wrote:
> > How does this compare to Cactus ?  To my understand,  it can test Actions w/o a 
> > container while Cactus can test Actions in-container.  Right?
> > 
> > ----- Original Message ----- 
> > From: "Ted Husted" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Tuesday, October 28, 2003 5:12 PM
> > Subject: Re: Unit Test Actions
> > 
> >>Steven Woody wrote:
> >> > Can I unit test Action subclasses with JUnit without running of a
> >> > Servlet container?
> >>
> >>http://strutstestcase.sourceforge.net/
> 
> 
> -- 
> Ted Husted,
>    Junit in Action  - <http://www.manning.com/massol/>,
>    Struts in Action - <http://husted.com/struts/book.html>,
>    JSP Site Design  - <http://www.amazon.com/exec/obidos/ISBN=1861005512>.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 

Reply via email to