[Ready! API 1.3.1]DataSource file path works in UI, failed from java runner with project properties
Hi Team,
I am using SoapUI Pro, Ready! API 1.3.1.
Currently I want to pass the file path from jUnit to SoapUI project properties and use that value in DataSource input file path.
JAVA:
properties[0] = "searchForProductsInputFile=price_input_201507.csv";
SoapUITestCaseRunner runner = new SoapUITestCaseRunner();
runner.setProjectFile("/Users/Catalog-int-jbo-101-remote-soapui-project.xml");
runner.setProjectProperties(properties);
runner.run();
In SoapUI
Project level, add customer properties: searchForProductsInputFile
In DataSource Step,
DataSource: File
File: /Users/${#Project#searchForProductsInputFile}
However, Seems the Datasource step doesn't pick up and read the input file.
Wierd thing is I tried to set customer properties: searchForProductsInputFile manual in the project level. The file is able to be read.
Any hints, or let me know if need further information to help out.
Thanks in advance
Charles
I figured it out.
Since datasource is pro-related function. SoapUIProTestCaseRunner should be used. That is why the testcase is working in SoapUI, but failed when it is called from jUnit.
import com.eviware.soapui.tools.SoapUITestCaseRunner;
-->
import com.eviware.soapui.SoapUIProTestCaseRunner;