title: SoapUI - Control flow from groovy
body: <p>In my groovy script I've a loop that I want to execute test step &quot;MyTestStep&quot; to run two times:</p>
  <pre><code>for (i = 0; i &lt; 3; i++) {
      testRunner.runTestStepByName(&quot;MyTestStep2&quot;)
  }
  </code></pre>
  <p>Works fine when I run the groovy script - but when I start the test case, the test runner first runs my groovy script and then once again &quot;MyTestStep&quot;.</p>
  <p>This is not what I want.</p>
  <p>Suggestions on how I can run the test step only from groovy-script?</p>
  <pre><code>--MyTestCase
  ---TestStep1 GroovyScript that executes teststep2 two times
  ---TestStep2: MyTestStep containing a rest request
  </code></pre>
  <p>So when I press play of MyTestCase: first groovy script starts, which is ok. But then the test continues to execute TestStep2 once more.</p>