WARNING: JMockit was initialized on demand, which may cause certain tests to fai

When we using Jmokit and Junit, it will show following warning when runing test cases in Eclipse:

 

WARNING: JMockit was initialized on demand, which may cause certain tests to fail;
please check the documentation for better ways to get it initialized.

 

Solution:

Add following in JVM arguments

-javaagent:{Jmokit file location}/jmockit-0.999.19.jar

你可能感兴趣的:(jmock)