\On 6/8/06, Craig McClanahan <[EMAIL PROTECTED]> 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. -- Wendy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]