Forum Discussion

UhsBat's avatar
UhsBat
Occasional Contributor
4 years ago

DataSource Step is failing in Jenkins with ReadyAPI 3.5.1 docker image

I am running my ReadyAPI projects in Jenkins using the Latest ReadyAPI docker image. Now facing issue in whatever new projects created with version 3.5.1.

I have a DataSource step and reading data from an Excel source. Its working completely fine when run in Local ReadyAPI in Windows system. But it gives below error when run in Jenkins using Docker image smartbear/ready-api-soapui-testrunner.

 

Anyone facing the same issue?

 

15:27:13 09:57:02,408 INFO [SoapUIProTestCaseRunner] running step [DataSource] 15:27:13 09:57:02,413 ERROR [SoapUI] An error occurred [java.lang.NullPointerException], see error log for details 15:27:13 java.lang.NullPointerException: Cannot invoke "java.io.File.exists()" because the return value of "java.io.File.getParentFile()" is null 15:27:13 at com.eviware.soapui.impl.wsdl.support.PathUtils.getExpandedResourceRoot(PathUtils.java:362) 15:27:13 at com.eviware.soapui.impl.wsdl.support.PathUtils.expandPath(PathUtils.java:93) 15:27:13 at com.eviware.soapui.impl.wsdl.teststeps.AbstractPathPropertySupport.expand(AbstractPathPropertySupport.java:83) 15:27:13 at com.eviware.soapui.impl.wsdl.teststeps.datasource.ExcelDataSource.a(ExcelDataSource.java:195) 15:27:13 at com.eviware.soapui.impl.wsdl.teststeps.datasource.ExcelDataSource.load(ExcelDataSource.java:186) 15:27:13 at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.c(WsdlDataSourceTestStep.java:613) 15:27:13 at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.b(WsdlDataSourceTestStep.java:607) 15:27:13 at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.a(WsdlDataSourceTestStep.java:794) 15:27:13 at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.next(WsdlDataSourceTestStep.java:804) 15:27:13 at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.run(WsdlDataSourceTestStep.java:221) 15:27:13 at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:292) 15:27:13 at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:52) 15:27:13 at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:182) 15:27:13 at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:1) 15:27:13 at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:130) 15:27:13 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) 15:27:13 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) 15:27:13 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) 15:27:13 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) 15:27:13 at java.base/java.lang.Thread.run(Thread.java:832) 15:27:13 09:57:02,413 ERROR [errorlog] java.lang.NullPointerException 15:27:13 java.lang.NullPointerException: null 15:27:13 at java.io.File.(File.java:279) ~[?:?] 15:27:13 at com.eviware.soapui.impl.wsdl.teststeps.datasource.ExcelDataSource.a(ExcelDataSource.java:196) ~[ready-api-soapui-pro-3.5.1.jar:3.5.1] 15:27:13 at com.eviware.soapui.impl.wsdl.teststeps.datasource.ExcelDataSource.load(ExcelDataSource.java:186) ~[ready-api-soapui-pro-3.5.1.jar:3.5.1] 15:27:13 at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.c(WsdlDataSourceTestStep.java:613) ~[ready-api-soapui-pro-3.5.1.jar:3.5.1] 15:27:13 at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.b(WsdlDataSourceTestStep.java:607) ~[ready-api-soapui-pro-3.5.1.jar:3.5.1] 15:27:13 at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.a(WsdlDataSourceTestStep.java:794) ~[ready-api-soapui-pro-3.5.1.jar:3.5.1] 15:27:13 at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.next(WsdlDataSourceTestStep.java:804) ~[ready-api-soapui-pro-3.5.1.jar:3.5.1] 15:27:13 at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.run(WsdlDataSourceTestStep.java:221) [ready-api-soapui-pro-3.5.1.jar:3.5.1] 15:27:13 at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:292) [ready-api-soapui-3.5.1.jar:3.5.1] 15:27:13 at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:52) [ready-api-soapui-3.5.1.jar:3.5.1] 15:27:13 at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:182) [ready-api-soapui-3.5.1.jar:3.5.1] 15:27:13 at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:1) [ready-api-soapui-3.5.1.jar:3.5.1] 15:27:13 at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:130) [ready-api-soapui-3.5.1.jar:3.5.1] 15:27:13 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?] 15:27:13 at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?] 15:27:13 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) [?:?] 15:27:13 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) [?:?] 15:27:13 at java.lang.Thread.run(Thread.java:832) [?:?] 15:27:13 java.lang.NullPointerException 15:27:13 at java.base/java.io.File.(File.java:279) 15:27:13 at com.eviware.soapui.impl.wsdl.teststeps.datasource.ExcelDataSource.a(ExcelDataSource.java:196) 15:27:13 at com.eviware.soapui.impl.wsdl.teststeps.datasource.ExcelDataSource.load(ExcelDataSource.java:186) 15:27:13 at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.c(WsdlDataSourceTestStep.java:613) 15:27:13 at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.b(WsdlDataSourceTestStep.java:607) 15:27:13 at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.a(WsdlDataSourceTestStep.java:794) 15:27:13 at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.next(WsdlDataSourceTestStep.java:804) 15:27:13 at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.run(WsdlDataSourceTestStep.java:221) 15:27:13 at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:292) 15:27:13 at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:52) 15:27:13 at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:182) 15:27:13 at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:1) 15:27:13 at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:130) 15:27:13 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) 15:27:13 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) 15:27:13 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) 15:27:13 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) 15:27:13 at java.base/java.lang.Thread.run(Thread.java:832)

  • sonya_m's avatar
    sonya_m
    4 years ago

    Thank you for investigating PrathapR !

     

    UhsBat I checked with the team, we didn't find a known bug immediately, contacting support would be the best next step since this needs deeper investigation. 

    If you post the final solution here, this will be really helpful for the community! Thank you!

  • PrathapR's avatar
    PrathapR
    Frequent Contributor

    Hey UhsBat 

     

    Are you using relative path(EX:${projectDir}/InputData/EmployeeData.xlsx) or Dynamic Paths(Ex: EX: C://InputData/EmployeeData.xlsx) in your data source?

     

    Thanks!

    • UhsBat's avatar
      UhsBat
      Occasional Contributor

      Hi PrathapR

       

      Thanks for the reply.

       

      I am setting Excel path dynamically using below code.

      def objProject = context.getTestSuite().getProject();
      def projPath = objProject.getPath()
      testSuite.setPropertyValue("DataSourcePath", "${projPath}${File.separator}data${File.separator}CustomerIdScenarios.xlsx")

      And in DataSource I am passing the "${#TestSuite#DataSourcePath}".

       

      It was working fine till ReadyAPI  V3.5 in both local ReadyAPI and Jenkins.

       

      Now the latest ReadyAPI giving error in Jenkins alone.

      I am using the latest ReadyAPI docker image to run suites.

      • PrathapR's avatar
        PrathapR
        Frequent Contributor

        If it was working in 3.5 and not now, may be there is some issue with current version.

         

        Hey sonya_m  do you have any info on this issue?

         

        Thanks!