【发布时间】:2011-09-20 02:05:34
【问题描述】:
当我尝试从 ANT 任务运行 Junits 时出现此错误。使用 eclipse 启动器它工作正常。 junit的版本是4.9,ANT版本是1.7 令人惊讶的是,它给出了“junit.framework.AssertionFailedError”,这是 JUNIT 3. 中的包结构,在 4 中它已更改为 org.junit。 我交叉检查了所有库,没有 junit 3.* 版本的参考——而且它仍然可以使用 eclipse 启动器工作。 有什么线索吗?让我知道是否需要更多细节。 Ant任务如下
<target name="test">
<junit fork="yes" haltonfailure="yes">
<test name="${test.class.name}" />
<formatter type="plain" usefile="false" />
<classpath refid="junittest.classpath" />
</junit>
</target>
【问题讨论】: