title: SoapUI: Pass property values to called test case
body: <p>I am a beginner in soapui testing. Hopefully you can help me solving this problem.</p>
  
  <p>In my test project I have a test suites which contains several test cases. Multiple test case will start the same test case. To run this test case I need some property values to be transferred to this test case.</p>
  
  <p>I tried to achieve this in two ways. But I failed in both.</p>
  
  <ol>
  <li><p>I tried to call the test case and set the needed properties in the test case. I start the test case from a Groovy script. But I couldn't find a good example how to set the properties in the called test case.</p></li>
  <li><p>I tried to get the property values of the calling parent test case inside the called test case. It looks like the parent test case that called the test case isn't available in the context of the running test case.</p></li>
  </ol>
  
  <p>The test cases, that will call the same test case, will be run in parallel. So, I think it isn't a solution to first set the property values and then start the test case, because they will be overwritten by the other test cases that run at the same time. Also using test suite properties for these values won’t work because of running the test cases in parallel.</p>
  
  <p>My test project looks like this.</p>
  
  <pre><code>MyProject
      TestSuite_APLtests
        TestCase_user_01
        Properties test step
        Run_test &lt;groovy script&gt;
        Step_01
        …..
      TestCase_user_02
        Properties test step
        Run_test &lt;groovy script&gt;
        Step_01
        …..
      TestCase_General
        Properties test step
        POST sessions
        Step_01
        …..
  </code></pre>
  
  <p>The ‘Properties test step’ of each ‘TestCase_user_’ contains a user and password needed in test case ‘TestCase_General’ and will be different for each test case.
  In the ‘Run_test’ groovy script of each ‘TestCase_user_’ the test case ‘TestCase_General’ is started by using:</p>
  
  <pre><code>def myTestSuite = testRunner.testCase.testSuite.project.getTestSuiteByName("TestSuite_APLtests")
  def myTestCase = myTestSuite.getTestCaseByName("TestCase_General")
  myTestCase.run(null, false)
  </code></pre>
  
  <p>How can I add the properties user and password to the run comment that starts the test case?</p>
  
  <p>If I try to get the property values with a groovy script in test case ‘TestCase_General’ I don’t know how to determine which test case has called ‘TestCase_General’. I found some posts on internet that suggests to use: <code>context.getProperty("#CallingRunTestCaseStep#")</code> to determine the calling test case. But this value is null. And when I try to check if the calling test case is available in the context by using: <code>context.hasProperty("#CallingRunTestCaseStep#")</code> this is false, so this doesn't work to find the calling test case.</p>
  
  <p>Can someone tell me what the solution will be to get this working.</p>
  
  <p>Thanks,</p>