0

我正在使用 ant 任务运行 selenium 脚本..使用命令提示符可以正常工作..但是从 ant 任务中,它不起作用..如何解决这个问题?

 <testcase classname="junit.framework.TestSuite"    name="com.openbravo.test.integration.erp.testsuites.regression.MRC0000_Logging" time="0.0010">
  <error message="config/OpenbravoERPTest.properties (No such file or directory)"   type="java.io.FileNotFoundException">java.io.FileNotFoundException: config/OpenbravoERPTest.properties (No such file or directory)
  at java.io.FileInputStream.open(Native Method)
  at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:120)
  at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:79)
 at com.openbravo.test.integration.erp.testscripts.OpenbravoERPTest.loadProperties(OpenbravoERPTest.java:117)
 at com.openbravo.test.integration.erp.testscripts.OpenbravoERPTest.setUpBeforeClass(OpenbravoERPTest.java:105)
 at org.eclipse.ant.internal.launching.remote.EclipseSingleCheckExecutor.executeTargets(EclipseSingleCheckExecutor.java:30)
 at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
 at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:424)
 at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:138)
 </error>
 </testcase>
 <system-out><![CDATA[asd
 ]]></system-out>
<system-err><![CDATA[]]></system-err>
</testsuite>
4

2 回答 2

0

路径名是相对的:config/OpenbravoERPTest.properties

您确定您正在从正确目录中的命令行执行脚本吗?

于 2012-08-22T13:02:07.047 回答
0

确保包含配置目录的目录位于类路径中。

于 2012-08-22T13:33:59.667 回答