Running each JUnit test in a separate JVM in Eclipse?

前端 未结 2 1482
春和景丽
春和景丽 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:00

    I also had similar needs and developed small maven plugin Jute which has been published in maven central. It starts external JVM process for each JUnit test method.

    0 讨论(0)
  • 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

    0 讨论(0)
提交回复
热议问题