ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Schmetzer" <>
Subject Re: Junit Tests with depedencies - possible to determine order
Date Tue, 14 Jun 2005 09:52:28 GMT
On Tue, June 14, 2005 9:31 am, Mikael Petterson (KI/EAB) said:
> Hi,
> we have a couple of junit tests that have 'oder' dependecy like, first
> CreateHwTest must be executed and then RecoverHwTest.
> Is it possible to set the order which the junit tests must be executed in?

JUnit explicitly does not support dependencies between test cases (or even
test methods within a test case). It is expected that each test method
will be completely independant from all other test methods, and so no
guarantees are given about the order in which test methods will be called.

The setUp() method are there for you to perform any operations, setup
fixtures, etc, before the test runs. tearDown() cleans up after each test.
It sounds like you could refactor your tests to use those methods instead?
The JUnit FAQ has a bit to say on the subject.


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

View raw message