[ About | Licence | Contacts ]
Written by Oleksandr Gavenko (AKA gavenkoa), compiled on 2018-11-21 from rev fcdd583e8795+.

SoapUI

Property syntax

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}
https://www.soapui.org/scripting-properties/property-expansion.html
Property Expansion.
https://www.soapui.org/docs/functional-testing/properties/transferring-properties.html
Transferring Property Values.

Working with properties from Groovy

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}' )
https://www.soapui.org/docs/functional-testing/properties/working-with-properties.html
Working with Properties.
https://www.soapui.org/scripting-properties/tips-tricks.html
Accessing Properties.