0

为了从 eclipse 内部运行我的 apache 轴集成测试,我需要在 eclipse junit 测试运行器上设置 -noloading 选项。有谁知道我该怎么做?

我正在使用 Eclipse 版本:3.5.1

4

2 回答 2

0

而不是设置 -noloading 参数(我认为当前的 Junit TestRunner 不支持该参数),而是将此方法添加到您的 junit 类中。它将直接解决您的问题

@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");
}
于 2013-10-25T04:14:46.110 回答
0

您可以通过添加条目 loading=false 来配置 junit.properties 文件。位于的文件应位于“user.home”中。

有关更多信息,请查看 jUnit 主页 [http://junit.sourceforge.net/junit3.8.1/index.html]。是的,我知道这个问题与 jUnit4 有关。我仔细检查了 junit.runner.BaseTestRunner 并且加载属性选项仍然存在。

于 2011-10-31T14:35:57.053 回答