At 4:44 PM -0800 11/22/04, Martin Cooper wrote:
On Mon, 22 Nov 2004 16:28:32 -0800, Don Brown <[EMAIL PROTECTED]> wrote:
 Perhaps this might be a good time to bring up the idea of bringing
 StrutsTestCase as a Struts subproject?  They have an implementation of
 the servlet api for testing.

Also, someone (Howard?) mentioned at ApacheCon that ServletUnit is a good, stable, full-featured framework for testing, well, servlet-based code. I'd like us to take a look at that before we make any hard decisions about testing frameworks.

I thought I knew, but then when I went investigating, I ran into the question of just what (or which) is servletunit?


There's a fairly dormant Sourceforge Project: http://servletunit.sourceforge.net/ where code is in the package com.kizna.servletunit

It's the top-level package for StrutsTestCase: http://strutstestcase.sourceforge.net/api/index.html


HTTPUnit has a servletunit package (com.meterware.servletunit): http://httpunit.sourceforge.net/doc/api/index.html


I think one (or more) of these might be as good or better as having Cactus tests in Struts as a whole -- but I still would prefer to use MockObjects for the kind of isolated testing I was trying to do with the CreateAction yesterday, so as to minimize the amount of extraneous setup required. That is, I'd prefer to use MockObjects if it worked for the test I needed. I suppose if we were using a mock servlet environment, I might be able to use components from it without having to simulate an entire Struts installation. (I see that the "ServletContextSimulator" in StrutsTestCase simply returns null for an attribute which isn't in the servlet context, which would be all I needed...)

Joe

--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com
"Narrow minds are weapons made for mass destruction" -The Ex

Reply via email to