开发者

How do I set the -noloading option in the junit4 test runner inside eclipse

In order to run my apache axis integration tests from inside eclipse, I need to set the -noloading option on the eclipse junit test runner. Does anyone know how I can do this??

I am using eclipse Version: 3.5.1开发者_Go百科


You can configure a junit.properties file by adding an entry loading=false. The file located should be located in the "user.home".

For more information check out the jUnit homepage [http://junit.sourceforge.net/junit3.8.1/index.html]. Yes I know this question is related to jUnit4. I double checked the junit.runner.BaseTestRunner and the loading properties option is still present.


rather than set the -noloading parameter (which I don't believe is supported in the current Junit TestRunner), add this method in your junit class. It will solve your issue directly

@BeforeClass
public static void beforeClass() {
 System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.Log4JLogger");
 System.setProperty("org.apache.commons.logging.LogFactory", "org.apache.commons.logging.impl.LogFactoryImpl");
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜