title: In soapUI, how do I transfer multiple property values from a groovy script to a property list, containing properties?
body: <p>I'm getting myself acquainted with groovy (,for soapUI) and have hit a roadblock trying to figure out how to transfer some property values to a property list. Tried out property transfer steps, but didn't help. I've kinda figured out that I'd need to use <em>'setPropertyValue'</em> and <em>'context.expand'</em> to start with. Just can't connect the dots yet.</p>
  
  <pre><code>def myTestCase = context.testCase
  
  File tempFile_first = new File("C:/Users/ethomas1/Desktop/my_Input_File_first.txt"
  List lines_first = tempFile_first.readLines()
  
  File tempFile_second = new File("C:/Users/ethomas1/Desktop/my_Input_File_Second.txt")
  List lines_second = tempFile_second.readLines()
  
  def x = Math.random()*10       // multiplying random with 10 so the resulting value would be &lt;= 10.
  i = String.valueOf(x).getAt(0)
  i = i.toInteger()
  
  myTestCase.setPropertyValue("num1", lines_first[i])
  myTestCase.setPropertyValue("num3", lines_first[i])
  myTestCase.setPropertyValue("num2", lines_second[i])
  myTestCase.setPropertyValue("num4", lines_second[i])
  
  num1 = context.expand( '${#TestCase#num1}' )
  num2 = context.expand( '${#TestCase#num2}' )
  num3 = context.expand( '${#TestCase#num3}' )
  num4 = context.expand( '${#TestCase#num4}' )
  
  log.info ("num1 is " + num1 + ", num2 is " + num2 + ", num3 is " + num3 + ", num4 is " + num4)
  </code></pre>