> -----Original Message-----
> From: Philemon Siclone [mailto:[EMAIL PROTECTED]
> Sent: lundi 23 ao�t 2004 20:08
> To: Cactus Users List
> Subject: RE: How to write "testsuite server-side fixtures"
>
> --- Vincent Massol <[EMAIL PROTECTED]> a �crit�:
> > Hi Phil,
> >
> > More precisely the setUp()/teardown() methods will be executed on the
> > server
> > side (which is what you want) but I now understand that you want this
> > for a
> > set of Cactus Test Cases and not just for one test case. Is that
> > correct?
>
> Yes it is ! Sorry if it wasn't very clear.
>
> >
> > Then, why don't you create a MyServletTestCase class which has a
> > default
> > setUp()/teardown() and then have your tests extend MyServletTestCase,
> > ensuring they call super.setUp()/super.tearDown()?
> >
> > Another option is to create this common setup/teardown in a separate
> > helper
> > class and call them from your test classes.
> >
> > Would that do it for you?
> >
>
> Well, not really... because I do not only want these fixtures to be the
> same code, I also want them to be executed only once before and after
> each TestCase, like real testsuite-fixtures (and if I am right your
> solutions get them executed once before and after each test method).
Ah yes.
>
> The only solution I came up with is quite ugly :
> "
> public class CactusSuite extends TestCase
> {
> public static Test suite()
> {
> TestSuite suite = new TestSuite();
> suite.addTestSuite(TestSuiteSetUp.class);
> suite.addTestSuite(MyFirstTest.class);
> suite.addTestSuite(TestSuiteTearDown.class);
> return suite;
> }
> }
> "
> Where MyFirstTest is my real ServletTestCase; and TestSuiteSetup and
> TestSuiteTearDown are ServletTestCase that simulate fixtures.
Nice. I find this quite good actually.
>
> Maybe if I have got time I'll dive into the sources and try to write a
> true "ServerSideSuite".
>
Cool.
> Anyway, thanks a lot for your answers and for the cactus project,
>
[snip]
Thanks
-Vincent
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]