1

My question goes in opposite direction of most questions regarding the same topic.

Is it possible to execute several JUnit test classes sequentially instead of in parallel using Eclipse Luna or Mars?

The reason for this is there are several integration tests using the same in-memory database instance, and each test class may create/drop tables according to its needs, so they may run in concurrency issues in different threads (while one test class drops on table in preparation for its execution, another can create the same table).

Essentially I want the same behavior as setting the Maven Surefire Plugin with reuseForks = false. It will take longer to run, but that is not a concern.

  • Some details are here http://stackoverflow.com/questions/7267790/does-junit-execute-test-cases-sequentially and http://stackoverflow.com/questions/423627/running-junit-tests-in-parallel-in-a-maven-build – saurav Feb 25 '16 at 17:00
  • Have you tried just running it, does it actually run in parallel. Perhaps if you have a [MCVE] that runs as you don't expect that could be a good question. – Jonah Graham Feb 25 '16 at 18:19
  • you shouldn't use JUnit, cause TestNG would suit there better in particular if you need to define a order of execution... – khmarbaise Feb 26 '16 at 09:08

0 Answers0