title: SoapUI Free - Groovy Script in Property Value to Get TestSuite Property
body: <p>I am using the free (non-PRO) SoapUI 5.0 and I have a list of properties in a Test Suite.
  I then have a number of Test Steps, each one having the same name as a Test Suite property.</p>
  
  <p>I'm trying to write Groovy script in a Test Step property to retrieve the value of the Test Suite property with the same name.</p>
  
  <p>For example:</p>
  
  <ul>
  <li>Test Suite has a property <strong>colour_red</strong> with the value 12345.</li>
  <li>Within the Test Suite is a Test Case, with a Test Step also called <em>colour_red</em>.</li>
  <li>Within the <em>colour_red</em> Test Step is a property "info".</li>
  <li>I'm trying to get the property value for "info" to be the Test Suite
  property <strong>colour_red</strong> value of 12345.</li>
  </ul>
  
  <p>What I have so far in the "info" property value:</p>
  
  <pre><code>${=new GroovyShell().evaluate(testRunner.testCase.testSuite.project.getPropertyValue(context.getCurrentStep().getLabel()))}
  </code></pre>
  
  <p>I'm not sure if I need the <strong>new GroovyShell().evaluate</strong> bit, but without that it still doesn't work. I cannot tell exactly what is being picked up but it is not the value of the Test Suite property with the same name.</p>
  
  <p>From what I can see the script should retrieve the current Test Step name (<em>colour_red</em>) and then look for a property called that in the Test Suite.</p>
  
  <p>My reason for doing this is that I have data in the Test Suite property values which needs to be shared between numerous Test Cases (all with many Test Steps).
  Without the PRO version I am struggling but I think with Groovy there should be a way to do this.</p>
  
  <p>Any help appreciated, thanks.</p>