Losing my mind for how a simple thing was turned into a complicated riddle.
See http://www.soapui.org/Functional-Testing/working-with-properties.html
If you do this:
testRunner.testCase.testSuite.setPropertyValue("Hostname", "02B3TEST0004")
log.info( testRunner.testCase.testSuite.getPropertyValue("Hostname"))
you will set a TestSuite level property:
After a lot of trial and error, I found out that if you want to get/set properties defined in a Properties Test Step, you must do this:
testRunner.testCase.testSteps["Properties"].setPropertyValue( "Hostname", "fanculo" )
log.info( testRunner.testCase.testSteps["Properties"].getPropertyValue( "Hostname" ))
very properly undocumented, thank you SmartBear... if this Bear is smart, I wonder the dummy ones...
So now we are ready to implement the DataSources in Groovy by reading a file and setting a property in a GroovyStep
Wednesday, August 8, 2012
Subscribe to:
Post Comments (Atom)
1 comment:
Post a Comment