Native library for Attach API not available in this JRE

java.util.ServiceConfigurationError: org.testng.ITestNGListener: Provider mockit.integration.testng.Initializer could not be instantiated: java.lang.IllegalStateException: Native library for Attach API not available in this JRE
at java.util.ServiceLoader.fail(Unknown Source)


解决方法:

在eclipse->run->run configurations->TestNG选择所运行的测试类,在Arguments下的VM Arguments下加上
-javaagent:C:\jmockit-1.13后便可正常运行test case了。

你可能感兴趣的:(软件测试)