Reputation: 427
I have some project properties with following names:
ApplicationServer
WebbServer
ServiceEndpoint
in my bat-file I try following:
set SOAPUI_HOME="C:\Program Files\SmartBear\SoapUI-Pro-5.1.2"
call %SOAPUI_HOME%\bin\testrunner.bat ^
-j ^
-fC:\Temp\Premie ^
-R"JUnit-Style HTML Report" ^
-R"JUnit-Style HTML Report" ^
-EDefault ^
-PApplicationServer ^
-P= ^
-PTESTAPPLICATIONSERVER ^
-PWebbServer ^
-P= ^
-PTESTWEBBSERVER ^
-PServiceEndpoint ^
-P= ^
-PURLTOTEST ^
"C:\TEMP\soapui-project.xml"
When I run the test from command line, the properties are not being updated from values in bat-file. What am I doing wrong?
Upvotes: 0
Views: 2729
Reputation: 21379
Looks like you were trying with -P
option to testrunner utility which is right way as per soapui documentation. But not passing values correctly.
P : Sets project property with name=value, e.g. -Pendpoint=Value1 -PsomeOtherProperty=value2
More info here
If the value includes spaces, enclose the entire argument in quotes. To override several variable values, specify the -P argument several times.
In your case, if you want to pass the value JBOSS
to project property ApplicationServer
, then here you go:
testrunner.bas -PApplicationServer=JBOSS <append other options one after the other separated by a space>
UPDATE: based on comments: You are not using it properly which I understand from your above post.
Here is modified command:
testrunner.bat -j -f "C:\Temp\" -R "JUnit-Style HTML Report" -PAppServer=TESTAPP -PWebbServer=TEST -PServiceEndpoint="services.test.com" -PdbServer=TESTDb "C:\SoapUI\soapui-project.xml"
Upvotes: 1