title: How to stop testcase execution if request fails in soapui using script assertion?
body: <p>If the soap request has a failure means <strong>Status != "HTTP/1.1 200 OK"</strong> , testCase should stop and no further steps should run</p>
  
  <p>There is a way to do this in <strong>groovy</strong>, but i <strong>do not want an extra test step to be added in testcase</strong></p>
  
  <pre><code>            def headers = testRunner.testCase.getTestStepByName("RequestName").httpRequest.response.responseHeaders['#status#']
              if (!headers.contains("HTTP/1.1 200 OK"))
              {
                  testRunner.fail("" + headers + "Flow failed")
                  testRunner.fail("No futher testSteps will be run inside the current case")
              }
  </code></pre>
  
  <p>Please note i <strong>cannot change below settings</strong> due to some other groovy code restriction </p>
  
  <p><a href="https://i.stack.imgur.com/nnTXy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nnTXy.png" alt="enter image description here"></a></p>
  
  <p>The reason for not changing above option i have a testcase where there are 10 steps. 1 is request and other 9 steps validate various things. So if i check the "Abort on error" option and step 3 fails. then none of the steps from 4 to 10 runs. So please provide a solution considering not using "<strong>abort</strong>" option</p>
  
  <p>So could you please provide a solution for <strong>script assertion</strong> without ticking this option."Abort on error" </p>
  
  <p>Since <strong>testRunner.fail</strong> is not available inside <strong>script assertion</strong> and also normal <strong>assertion</strong> (assert 0==1) does not stop testcase unless we tick the above setting. i am stuck with this limitations  </p>