Forum Discussion

6pepe6's avatar
6pepe6
New Contributor
9 years ago

Is it possible to pass test case properties from command line?

Hi All,

 

Is it possible to pass test case properties from command line? ie.:
use this formula in the testrunner.bat/sh for testcases?:
-Dsoapui.properties.<testcase name>=<properties file>
In the docs I read this which indicates that it should work:
"

An extended possibility to override/set properties at the project/testsuite/testcase/mockservice level is also available by adding a

soapui.properties.=pathtopropertiesfile

value to the global or system properties, where shortened-name-of-object is the name of the corresponding object with only characters. For example if you have a TestSuite in your project named "TestSuite 1", you can set

-Dsoapui.properties.TestSuite1=testsuite1props.properties

"

at https://www.soapui.org/scripting---properties/working-with-properties.html#2-Setting-properties-from-the-command-line

and for project properties it is working fine, but for test case it does not.
When looking at the command line log, I see this for the project:
[AbstractTestPropertyHolderWsdlModelItem] Overriding 6 properties from [<properties file>] in [<project name>]

but I cannot see anything similar for the test case so I either used it incorrectly (though no error was present neither) or something else is missing...

Any help is appreciated.

Thanks a lot

Pete