dmltn84
14 years agoOccasional Contributor
property is not set by groovy script
Hello,
I have a groovy script that should update property value on each iteration, value is generated correctly and supposedly is expanded correctly in the output, but it never makes it to soap request. Script is as follows:
Script output is as follows:
Value 'strings' is correctly extracted, but it never appears in the request:
I have a groovy script that should update property value on each iteration, value is generated correctly and supposedly is expanded correctly in the output, but it never makes it to soap request. Script is as follows:
def myTestCase = context.testCase
File tempFile = new File("c:/my_Input_File.txt")
List lines = tempFile.readLines()
def x = Math.random()*10
i = String.valueOf(x).getAt(0)
i = i.toInteger()
myTestCase.setPropertyValue("inputValue", lines[i])
log.info context.expand( '${#TestCase#inputValue}' )
Script output is as follows:
Thu Mar 01 13:43:02 CET 2012:INFO:strings
Value 'strings' is correctly extracted, but it never appears in the request:
<nx4:operationType></nx4:operationType>