2012-08-22 57 views
0

我使用螞蟻task..it運行硒腳本工作正常使用命令prompt..but從螞蟻的任務,它不是working..How來解決這個問題?無法找到屬性文件(FileNotFoundException異常)

<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> 

回答

0

確保包含您的配置目錄的目錄是在classpath。

0

路徑名是相對的:config/OpenbravoERPTest.properties

你確定你是在執行命令行腳本在正確的目錄?

+0

它在基本目錄only..using我正在執行ant任務.. – Chikku