Properties
Properties
when creating a testsuite or a testcase it is required to send the properties from one step to another step for which there is an option of ‘Property Transfer’ in soap UI. Especially when you need to transfer the variable to multiple Steps there is a bit of overhead.
The Best practice is to send the properties to higher level and use them.
TestSuite-Level
Set
context.gettestcase().gettestsuite().setPropertyValue(“property1”,Variable);
Get
def Var1 = context.expand(‘${#TestSuite#property1}’);
Getting in a Request
Project Level
Set
testrunner.getTestCase().getProject().setProperttyValue(“property3”,Variable3);
Get
def Var3 = context.expand(‘${#Project#property3}’);
Getting in a Request
<user>${#Project#Property3}</user>
<pwd>${#Project#Property3}</pwd>