We are using testng for testing, and I added a new class using powermockito 
(the test class extends PowerMockTestCase)

However we got an exception with another class that uses powermocks's 
WhiteboxImpl.invokeMethod(). The exception is "Cannot cast 
org.powermock.api.mockito.mockmaker.PowerMockMaker to 
org.mockito.plugins.MockMaker"

In order to avoid that exception with one class, my workaround (which may not 
be best solution but all I could find) was to add "extends TestCase" which 
assigned that class to run with Junit4 instead of TestNG like all the others.

The problem now becomes that during a static analysis Jenkins phase, it looks 
for but can't find the surefire files in target/surefire-reports/junitreports 
like they were before.

Because after the change mentioned above (forcing JUNIT by extending TestCase) 
the surefire files are now divided into 2 subdirectories: testng-native-results 
and testng-junit-results.  This is causing the problem

Is there a way to prevent surefire tests from being divided between the 2 
directories?

Reply via email to