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.

Cheers,
Joe


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to