struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wendy Smoak" <>
Subject Re: [shale] Maven, Cargo and integration testing
Date Fri, 09 Jun 2006 02:00:25 GMT
\On 6/8/06, Craig McClanahan <> wrote:

> I've seen that convention, but have a question for you ... since the unit
> tests for webapps built from these examples are going to use the mock
> objects in the Shale Test Framework anyway, what would you think of having a
> convenience abstract base class in shale-test (probably a subclass of
> AbstractHtmlUnitTestCase) that embedded the container startup/shutdown
> stuff?  It would likely need some system properties to specify the container
> id (default to "tomcat5x") and the WAR to be tested, but this approach would
> save having to construct a customized TestSetup class in every webapp
> project.

I'd definitely like to see something that can be reused.  Subclassing
AbstractHtmlUnitTestCase to add 'start' and 'stop' methods works, but
limits you to only using it with HtmlUnit-- and if you used
setUp/tearDown, you would be starting and stopping the container for
each testXxx method.

I'm working with o.a.s.test.cargo.CargoTestSetup now.  This is using
Cargo's 'generic' Java API [1], so it should be possible to start any
container that Cargo supports, and then to run the same tests in
multiple containers simply by varying the system properties.

[1] as opposed to the strongly typed API, nothing to do with Java SE 5 generics.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message