Running tests in certain order
0 posts in topic
Flat View  Flat View

Posted By:   Mirko_R
Posted On:   Tuesday, September 19, 2006 10:36 AM


I've started using jUnit for testing of a database application. I came in the situation that I need the "insertRecoreds" test run before "deleteRecoreds" so I would have something to delete :) .

It's just an example, but the question is can I specify the order of test execution in a class?

I suppose I could separate all the critical tests in diffrent classes and supply them to JUnitCore.main in appropriate order, or set up the environment with @Before, but this is also needed.

btw. I'm using jUnit 4.1 on Java1.5

About | Sitemap | Contact