Jenkins(非本地)无法找到输入表(.xlsx)

时间:2015-06-15 07:45:49

标签: jenkins

当我在本地Jenkins的.bat文件的帮助下执行它时,我的jar文件工作正常。

但是当我在组织的Jenkins中执行相同的代码/ jar时,它无法找到输入文件。它给了我以下错误

 INFO [main] (Base.java:18) - Firefox Launching....
Browser Launched for Test Case : Admin_GetNextLead
**java.io.FileNotFoundException: C:\Users\Ayan_Haldar\workspace2\test\Test\test\TestData.xlsx (The system cannot find the path specified)**
    at java.io.FileInputStream.open0(Native Method)
    at java.io.FileInputStream.open(FileInputStream.java:195)
    at java.io.FileInputStream.<init>(FileInputStream.java:138)
    at subscripts.XcelReader.ExcelFile(XcelReader.java:29)
    at test.Admin_GetNextLead.test(Admin_GetNextLead.java:67)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
    at org.testng.SuiteRunner.run(SuiteRunner.java:240)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
    at org.testng.TestNG.run(TestNG.java:1057)
    at test.RunTest.main(RunTest.java:132)
Browser Closed for Test Case : Admin_GetNextLead
result:false

你能帮帮我吗?

1 个答案:

答案 0 :(得分:0)

确保您所在组织的jenkins计算机具有路径C:\Users\Ayan_Haldar\workspace2\test\Test\test\TestData.xlsx。此路径存在于您的本地jenkins计算机中,但不存在于组织的jenkins计算机中。