com.eviware.soapui.model.propertyexpansion.PropertyExpansionUtils.globalProperties.setPropertyValue('userID', 'ID from response')
有人对此有所了解吗?
提前感谢您的回答。
答案 0 :(得分:2)
这是可以设置全局属性值的groovy脚本。
Groovy脚本
def newValue = 'testsetvalue'
//set the value to global property called PROPERTY_NAME
com.eviware.soapui.SoapUI.globalProperties.setPropertyValue('PROPERTY_NAME', newValue)
// get the property value which was set above.
def getNewValue = com.eviware.soapui.SoapUI.globalProperties.getPropertyValue('PROPERTY_NAME')
//assert it
assert getNewValue == newValue