Forum Discussion
Hi,
Please refer to this page explaining some tips you can find useful. Pay special attention to the Configuring properties from external file section.
Thanks Tanya. I tried the instructions in the page you provided and in other posts which are referenced and also tried many tweaks but have been unsuccessful.
The command line options specified on this page are not for Maven command line. They are for SoapUI testrunner .bat/.sh which I am not using. Should these apply to Maven command line as well?
Here is what my pom file looks like currently:
<configuration>
<projectFile>${TestFile}</projectFile>
<testSuite>${TestSuite}</testSuite>
<testCase>${TestCase}</testCase>
<endpoint>${EndPoint}</endpoint>
<testExecution>${TestExecution}</testExecution>
<outputFolder>target/surefire-reports</outputFolder>
<junitReport>true</junitReport>
<exportwAll>true</exportwAll>
<printReport>true</printReport>
<testFailIgnore>true</testFailIgnore>
<projectProperties>
<value>propname1=propvalue:1</value>
<value>propname2=propvalue:2</value>
…
<value>propnameN=propvalue:N</value>
</projectProperties>
</configuration>
I have tried commenting out <projectProperties> block and added below instead:
<soapuiProperties>
<property>
<name>soapui.properties</name>
<value>test.properties</value>
</property>
</soapuiProperties>
Created "test.properties" file in same path. Also, tried by providing full path of test.properties file.
I have tried several other variations like providing property value from maven command line like so:
pom.xml:
...
<soapuiProperties>
<property>
<name>soapui.properties</name>
<value>${PropFile}</value>
</property>
</soapuiProperties>
Maven command line:
mvn eviware:maven-soapui-pro-plugin:test -DTestFile=soapui-project.xml -DPropFile=test.properties
My property values contain colons so I have also tried after escaping them in test.properties. I have given full permission for test.properties to all. I am running on Linux.
I have also tried using <globalProperties> because that will work in my case as well.
In every case, it is not loading properties from test.properties file, it is loading from SoapUI. If I uncomment <projectProperties>, then those are loaded.
Related Content
- 10 years ago
- 4 years ago
Recent Discussions
- 22 days ago