testng-eclipse
testng-eclipse copied to clipboard
testng-eclipse + testng + mockito + powermock does not work.
when using mockito + powermock with testng, we need to set the "object-factory" attribute in the testng.xml, like this
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="ProjectCommon" parallel="classes" object-factory="org.powermock.modules.testng.PowerMockObjectFactory">
<test name="common" preserve-order="false">
<packages>
<package name="xxx.yyy.*" />
</packages>
</test>
</suite>
when starting the testsuite using "mvn" from commandline everything works as expected. when the tests are started using the eclipse-plugin i get a nullpointer-exception and the testrun fails.
seems to be some classloading issues, since the error happens while initializing our JAX-WS Clients.
Caused by: javax.xml.ws.WebServiceException: Unable to createEndpointReference Provider
at javax.xml.ws.spi.Provider.provider(Unknown Source)
at javax.xml.ws.Service.
hmm seems to be some linkageerrors occur while bootstraping JAX-WS. This seems to be caused by the proxy'ing of mockito/powermock
I have to correct myself. happens also outside the eclipse plugin, when running mvn on the commandline.