Beno_Iskratel
14 years agoFrequent Contributor
Set properties from MOCK
hi,
i have mock servis and i would like to set properties from Start Script and OnRequest Script.
i know how to work with properties from groovy:
...but,
what about mock?
it's probabley very easy but i just can't find the answer.
(global property works in mock just fine, what about the others?)
with best regards,
beno
i have mock servis and i would like to set properties from Start Script and OnRequest Script.
i know how to work with properties from groovy:
// get properties from testCase, testSuite and project
def testCaseProperty = testRunner.testCase.getPropertyValue( "MyProp" )
def testSuiteProperty = testRunner.testCase.testSuite.getPropertyValue( "MyProp" )
def projectProperty = testRunner.testCase.testSuite.project.getPropertyValue( "MyProp" )
def globalProperty = com.eviware.soapui.SoapUI.globalProperties.getPropertyValue( "MyProp" )
// setting values is equally straigh forward
testRunner.testCase.setPropertyValue( "MyProp", someValue )
testRunner.testCase.testSuite.setPropertyValue( "MyProp", someValue )
testRunner.testCase.testSuite.project.setPropertyValue( "MyProp", someValue )
com.eviware.soapui.SoapUI.globalProperties.setPropertyValue( "MyProp", someValue )
...but,
what about mock?
it's probabley very easy but i just can't find the answer.
(global property works in mock just fine, what about the others?)
with best regards,
beno