Hello,

We have a project that uses Guice 3 and TestNG for unit tests. TestNG now has support for Guice (which we don't use). The problem is that TestNG uses Guice 2. Surefire puts TestNG and its dependencies (including Guice 2) first in the classpath. This makes our tests fail because we use Guice 3 features and JSR 330 annotations.

Interestingly, one workaround – besides using an older TestNG version that does not have Guice support – is to run Surefire with forkMode=never. This puts TestNG at the end of the test classpath so that the project's Guice 3 dependency wins. While this is nice in our current situation, it is inconsistent. I don't think different forkModes should yield different test classpaths.

Any ideas how this could be fixed? I think something needs to be done on both sides, Surefire and TestNG.

Here's the corresponding discussion on TestNG's Google group:

http://groups.google.com/group/testng-users/browse_thread/thread/db58d13ca498bb92

Thanks,
Reinhard


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to