ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ylan Segal" <y...@digiworks.tv>
Subject RE: Is there any way to run a single test _method_ with <junit> ?
Date Fri, 08 Feb 2002 21:53:30 GMT
Phil,
> The reason I want to do this is that there is some static
> cruft left around by a class used by the tests which
> messes up subsequent tests, so I'd like to run each
> test method separately with fork='true'.
>
As do not think that you can do what you want, but there is a little bit of
hope. Each time a test method is run, the setUp method is called before and
the tearDown methods after.
This means that whatever happens in one test, should not ruin the others,
because you can take care of cleaning in the tearDown.

For example, when I write test form some classes that access a database and
need data in place in the database, I insert the data in the setUp method,
and then clean it up in the tearDown method. This way, the initial data in
the db is exactly the same for all the test methods.

Does any of this help you? Does it make sense?

Happy Debugging!.

Ylan Segal.



--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message