ContributionsMost RecentMost LikesSolutionsjenkins integration data file spreadsheet is not found When I try to run a Test Suite that depends on an Excel data file as a Jenkins job, somewhere it appears that the path to the data file, which created on a Windows system, was saved with an absolute path which does not work on a Linux Jenkins agent. An error is thrown saying that the data file is not found. Is there a way these paths can be saved as relative? 12:27:08,278 INFO [SoapUIProTestCaseRunner] Running TestCase [Event Detail TestCase] 12:27:08,279 ERROR [SoapUI] An error occurred [C:/Users/david.jensen/SoapUI Projects/ESB Data.xls (No such file or directory)], see error log for details java.io.FileNotFoundException: C:/Users/david.jensen/SoapUI Projects/ESB Data.xls (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:146) at com.eviware.soapui.impl.wsdl.teststeps.datasource.ExcelFacade.readWorkbookFrom(ExcelFacade.java:32) at com.eviware.soapui.impl.wsdl.teststeps.datasource.ExcelDataSource.a(ExcelDataSource.java:133) at com.eviware.soapui.impl.wsdl.teststeps.datasource.ExcelDataSource.load(ExcelDataSource.java:121) at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.prepare(WsdlDataSourceTestStep.java:411) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:132) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:1) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:130) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) 12:27:08,282 ERROR [AbstractTestRunner] Exception during Test Execution java.lang.Exception: Failed to prepare testStep [Retrieve Country Code]; java.io.FileNotFoundException: C:/Users/david.jensen/SoapUI Projects/ESB Data.xls (No such file or directory) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:136) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:1) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:130) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) 12:27:08,283 INFO [SoapUIProTestCaseRunner] Finished running TestCase [Event Detail TestCase], time taken: 0ms, status: FAILED 12:27:08,285 INFO [SoapUIProTestCaseRunner] Running TestCase [Calibration Device TestCase] 12:27:08,296 INFO [SoapUIProTestCaseRunner] running step [sapId] java.io.FileNotFoundException: C:/Users/david.jensen/SoapUI Projects/ESB Data.xls (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:146) at com.eviware.soapui.impl.wsdl.teststeps.datasource.ExcelFacade.readWorkbookFrom(ExcelFacade.java:32) at com.eviware.soapui.impl.wsdl.teststeps.datasource.ExcelDataSource.a(ExcelDataSource.java:133) at com.eviware.soapui.impl.wsdl.teststeps.datasource.ExcelDataSource.load(ExcelDataSource.java:121) at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.next(WsdlDataSourceTestStep.java:447) at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.run(WsdlDataSourceTestStep.java:134) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:223) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:47) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:145) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:1) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:130) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) 12:27:08,300 ERROR [SoapUIProTestCaseRunner] sapId failed, exporting to [/opt/jenkins/workspace/qa-esb-tests/target/soapui-reports//ageLOC_ME_TestSuite-Calibration_Device_TestCase-sapId-0-FAILED.txt] 12:27:08,302 INFO [SoapUIProTestCaseRunner] Finished running TestCase [Calibration Device TestCase], time taken: 0ms, status: FAILED Re: Groovy Test Step not running while integrated into Jenkins. Thank you for your further explanation. I will try that. Re: Groovy Test Step not running while integrated into Jenkins. OK. I was trying to figure out what you were meaning... So, testRunner is a different object I can call for the same information. I will look it up on the JavaDocs. Re: Groovy Test Step not running while integrated into Jenkins. I have included the Jenkins pom.xml below. I don't think there is anything that would interfere, but please let me know your opinion. I'm sorry, I am unfamiliar with using the testRunner, I'm assuming in Jenkins, instead of context. If you could point me to documentation or show me how I can do that I would appreciate it. <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <packaging>pom</packaging> <groupId>com.nuskin.qa.services.tests</groupId> <artifactId>test-suite</artifactId> <version>1.0.0-SNAPSHOT</version> <name>QA Account Service Tests</name> <pluginRepositories> <pluginRepository> <id>smartbear-sweden-plugin-repository</id> <url>http://www.soapui.org/repository/maven2/</url> </pluginRepository> <pluginRepository> <id>eviwarePluginRepository</id> <url>http://mvnrepository.com/artifact/</url> </pluginRepository> </pluginRepositories> <build> <plugins> <plugin> <groupId>com.smartbear</groupId> <artifactId>ready-api-maven-plugin</artifactId> <version>1.3.1</version> <configuration> <projectFile>${basedir}/Account-Service-soapui-project.xml</projectFile> <outputFolder>${basedir}/target/soapui-reports/</outputFolder> <junitReport>true</junitReport> <endpoint>https://test.nuskin.com</endpoint> <projectProperties> </projectProperties> <skip>${skipITs}</skip> </configuration> <dependencies> <dependency> <groupId>org.reflections</groupId> <artifactId>reflections</artifactId> <version>0.9.9-RC1</version> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>3.10-FINAL</version> <exclusions> <exclusion> <groupId>org.apache.xmlbeans</groupId> <artifactId>xmlbeans</artifactId> </exclusion> </exclusions> </dependency> </dependencies> <executions> <execution> <phase>integration-test</phase> <goals> <goal>test</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project> Re: Groovy Test Step not running while integrated into Jenkins. Oh, by the way, the test suite is working perfectly in the SoapUI interface. It is when it is run by the Jenkins agent when I see this difficulty. Re: Groovy Test Step not running while integrated into Jenkins. Logging the request and response would be helpful indeed. I've searched for how to do that in the forums but could not find it. Would you show me how to do that? Thanks! Re: Groovy Test Step not running while integrated into Jenkins. OK, Thank you. I see how that was much better than what I was doing. But after placing that in a Jenkins environment, it still doesn't increment that property from the groovy script. Re: Groovy Test Step not running while integrated into Jenkins. OK, here is the groovy test step: def createAccountCount = context.expand( '${#Project#createAccountCount}' ); log.info("The current createAccountCount = " + createAccountCount + "\nWill be incremented."); return ++createAccountCount; Once the variable createAccountCount is incremented, it is transferred back to the Project property "createAccountCount" and used to create a new account user name in a POST to a service. Groovy Test Step not running while integrated into Jenkins. I developed my test suites on Windows Ready API! 1.4.1 and use SVN to place those test suites in a repository. I configured the pom.xml so that the test suite is running but there are Groovy Test Step that I rely on that are not running. I do not have any stand alone scripts yet so I don't think I need to commit a scripts folder with the suite to SVN. All groovy code is contained in test steps. The Jenkins server I'm working with is Linux and did not configure it, so I don't know how that was set up, but I can find things out about it. What additional information is needed to help me get these groovy script test steps working? Here is s snippet from the Jenkins console that shows some of the warnings that I am looking at: Executing Maven: -B -f /opt/jenkins/workspace/qa-account-services-tests/pom.xml clean verify [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building QA Account Service Tests 1.0.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ test-suite ---[INFO] Deleting /opt/jenkins/workspace/qa-account-services-tests/target [INFO] [INFO] --- ready-api-maven-plugin:1.3.1:test (default) @ test-suite ---Downloading: https://nexus.nuskin.net/nexus/content/groups/public/eviware/reports/1.0/reports-1.0.pom [WARNING] The POM for eviware:reports:jar:1.0 is missing, no dependency information availablelog4j:WARN Continuable parsing error 29 and column 23 log4j:WARN An element with the identifier "CONSOLE" must appear in the document. log4j:ERROR No appender named [CONSOLE] could be found. 02:36:08,113 WARN [ReadyApiPaths] System property 'soapui.home' is not set! Using this directory instead: . log4j:WARN No appenders could be found for logger (com.netflix.governator.lifecycle.ClasspathScanner). log4j:WARN Please initialize the log4j system properly. Failed to create icon: java.lang.InternalError: Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable. 02:36:15,372 WARN [ReadyApiPaths] System property 'soapui.home' is not set! Using this directory instead: . 02:36:15,374 WARN [SoapUI] Missing folder [/opt/jenkins/workspace/qa-account-services-tests/ext] for external libraries 02:36:15,375 INFO [DefaultSoapUICore] Creating new settings at [/home/jenkins/soapui-settings.xml] 02:36:15,828 WARN [SoapUIProGroovyScriptEngineFactory] Missing scripts folder [/opt/jenkins/workspace/qa-account-services-tests/scripts] 02:36:15,832 WARN [ReadyApiPaths] System property 'soapui.home' is not set! Using this directory instead: . 02:36:16,070 WARN [ReadyApiPaths] System property 'soapui.home' is not set! Using this directory instead: . 02:36:16,478 INFO [PluginManager] 0 plugins loaded in 1 ms 02:36:16,478 INFO [DefaultSoapUICore] All plugins loaded 02:36:16,864 WARN [ReadyApiPaths] System property 'soapui.home' is not set! Using this directory instead: . 02:36:16,864 WARN [SoapUI] Missing folder [/opt/jenkins/workspace/qa-account-services-tests/ext] for external libraries 02:36:16,865 INFO [DefaultSoapUICore] Creating new settings at [/home/jenkins/soapui-settings.xml] 02:36:16,883 WARN [ReadyApiPaths] System property 'soapui.home' is not set! Using this directory instead: . 02:36:16,948 INFO [PluginManager] 0 plugins loaded in 0 ms 02:36:16,948 INFO [DefaultSoapUICore] All plugins loaded 02:36:17,333 INFO [WsdlProject] Loaded project from [file:/opt/jenkins/workspace/qa-account-services-tests/Account-Service-soapui-project/] 02:36:17,840 WARN [SoapUIProGroovyScriptEngineFactory] Missing scripts folder [/opt/jenkins/workspace/qa-account-services-tests/scripts] 02:36:18,643 INFO [SoapUIProTestCaseRunner] Running tests in project [Account-Service] 02:36:18,646 INFO [SoapUIProTestCaseRunner] Running Project [Account-Service], runType = SEQUENTIAL 02:36:18,662 INFO [SoapUIProTestCaseRunner] Running TestCase [/v1/account TestCase] 02:36:18,694 INFO [SoapUIProTestCaseRunner] running step [Increment Accout Count] 02:36:19,133 INFO [log] This is the createAccountCount = 4 02:36:19,136 INFO [SoapUIProTestCaseRunner] running step [Save New Account Count] 02:36:19,138 INFO [SoapUIProTestCaseRunner] running step [POST New Account] 02:36:26,448 INFO [SoapUIProTestCaseRunner] Assertion [Valid HTTP Status Codes] has status FAILED 02:36:26,448 ERROR [SoapUIProTestCaseRunner] ASSERTION FAILED -> Response status code:400 is not in acceptable list of status codes 02:36:26,448 ERROR [SoapUIProTestCaseRunner] POST New Account failed, exporting to [/opt/jenkins/workspace/qa-account-services-tests/target/soapui-reports//AccountService_TestSuite-v1account_TestCase-POST_New_Account-0-FAILED.txt] What I am doing is incrementing an account count before I use it to create a new account and the suite is failing because it is using an account name that already exists. There are sundry other warnings I wouldn't mind knowing how to resolve. Thanks! Solved