Injecting property:
${#Project#NAME} ${#TestSuite#NAME} ${#TestCase#NAME}
Injecting Groovy script result:
${=(int)(Math.random()*1000)} ${=new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").format(new Date())} ${=import static java.util.UUID.randomUUID; randomUUID() as String}
Accessing properties:
testRunner.testCase.getPropertyValue("NAME") testRunner.testCase.testSuite.getPropertyValue("NAME") testRunner.testCase.testSuite.project.getPropertyValue("NAME")
Setting properties:
testRunner.testCase.setPropertyValue("NAME", "VAL"); testRunner.testCase.testSuite.setPropertyValue("NAME", "VAL"); testRunner.testCase.testSuite.project.setPropertyValue("NAME", "VAL");
Working with global properties:
com.eviware.soapui.SoapUI.globalProperties.getPropertyValue("NAME") com.eviware.soapui.SoapUI.globalProperties.setPropertyValue("NAME", "VAL") com.eviware.soapui.SoapUI.globalProperties.getProperty("NAME").setValue("VAL")
There is removeProperty method for removing properties.
To expand property syntax:
context.expand( '${#Project#PROP}' )