I'm using JUnit to run my integration tests along with maven-surefire. I've a suite with 300+ tests to be executed and forks are used to avoid sharing resources. There are few tests which run for longer time, so I definitely don't want them to start executing at the end, which will eventually increase the overall execution time bit more longer. I've a mechanism to figure out the long running tests and order them at runtime before starting execution.
I tried below two approaches:
1). Adding the Long Running tests at the very beginning of SuiteClasses.
2). Created a CustomisedRunner to run tests in Parallel, but they are not running in different JVMs (Fork failed to create number of JVMs mentioned in forkCounts)
I like to run the tests in the same order as in suite using Fork(different JVMs). Any suggestions would be highly appreciated. Thanks in advance!!