You are viewing a plain text version of this content. The canonical link for it is here.
Posted to surefire-dev@maven.apache.org by Ravi Prakash <ra...@usc.edu> on 2010/02/09 21:45:53 UTC

Running tests in different JVMs

Hi,

I am using Maven and TestNG. I've got two groups of unit tests which unit
test different files in the same module. However both of the tests need to
set the application's URL Stream Handler (specifically URL.
setURLStreamHandlerFactory()
http://java.sun.com/j2se/1.5.0/docs/api/java/net/URL.html#setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory)<http://java.sun.com/j2se/1.5.0/docs/api/java/net/URL.html#setURLStreamHandlerFactory%28java.net.URLStreamHandlerFactory%29>)
This function can be called only once in each JVM.

Is there a way I can run the two unit tests in separate JVMs?

Cheers
Ravi