ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Weigenand <>
Subject Re: [PATCH]Pre and Post targets for junit
Date Thu, 05 Oct 2000 12:55:36 GMT
Jeff Martin <> writes:

Hello Jeff,

> This patch adds the attributes pretarget and posttarget to the test and
> batchtest tags for the junit task.
> The targets will be run before and after each test.

Mmh, i don't think this is not quite what i was reffering to. I was talking
about setting the scene for a whole test suite (though you can have one in a
single class).

I meant starting a server before running the tests and stopping it
afterwards. So the granularity of your patch is way too fine. This could be
accomodated by adding <setUp> and <tearDown> elements to the junit task.

Pre- and Posttargets as you call them are already in the junit (3.2)
package. Have a look at the TestDecorator class. I think it has already setUp
and tearDown to set the fixture for a test and tear it down when run.


View raw message