Running each JUnit test in a separate JVM in Eclipse?

前端 未结 2 1483
春和景丽
春和景丽 2020-12-16 15:17

I have a project with nearly 500 individual tests in around 200 test classes. Some of these tests don\'t do a great job of tearing down their own state after they\'re finish

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-16 16:01

    If you use Ant in Eclipse, you can set the JUnit task to fork a new JVM process for each test, providing isolation.

    http://ant.apache.org/manual/Tasks/junit.html

提交回复
热议问题