Forum Discussion
MartinSpamer
12 years agoFrequent Contributor
It is Property expansion, so the required item must exist as a custom property in the first place.
You can use the following scope to access custom properties.
#System#
#Global#
#Project#
#TestSuite#
#TestCase#
#TestStep#
${#SCOPE#CustomPropertyName}
However do you really need property expansion? You can access the Names and properties from Groovy as shown below.
This should also answer ChristianB's question, there are two easy ways.
You can use the following scope to access custom properties.
#System#
#Global#
#Project#
#TestSuite#
#TestCase#
#TestStep#
${#SCOPE#CustomPropertyName}
However do you really need property expansion? You can access the Names and properties from Groovy as shown below.
This should also answer ChristianB's question, there are two easy ways.
// get properties from testCase, testSuite and project
log.info testRunner.testCase.name + "=" + testRunner.testCase.getPropertyValue( "PropertyName" )
log.info testRunner.testCase.testSuite.name + "=" + testRunner.testCase.testSuite.getPropertyValue( "PropertyName" )
log.info testRunner.testCase.testSuite.project.name + "=" + testRunner.testCase.testSuite.project.getPropertyValue( "PropertyName" )
log.info com.eviware.soapui.SoapUI.globalProperties.getPropertyValue( "PropertyName" )
context.expand( '${#Project#PropertyName}' )
context.expand( '${#TestSuite#PropertyName}' )
context.expand( '${#TestCase#PropertyName}' )
context.expand( '${#TestStep#PropertyName}' )