JUnit task supports specifying the JVM to use when running the tests in forked mode. This feature does not exist in the task JUnitLaucher. Unless there's is an alternative I'm missing, I'd say the nested element `fork` should allow specifying a different JVM for running the tests. This would be very useful, for example, for running the same testsuite against different JVMs in a single run. Thank you.
Hello Filipe, > Unless there's is an alternative I'm missing, I'd say the nested element `fork` should allow specifying a different JVM for running the tests. What you note is correct and you didn't miss anything. The fork element currently doesn't have a way to specify an alternate "java" command/location. > This would be very useful, for example, for running the same testsuite against different JVMs in a single run. I think that's a valid point. I'll enhance the fork element in the coming days to help support this.
I've now pushed a commit to upstream which introduces a new optional "java" attribute to the <fork> element of the junitlauncher task. This attribute can be set to point to any "java" command of choice to launch the forked tests. This will be available in Ant release 1.10.14 (no specific date).