title: Logging SoapUI test case failure messages using groovy
body: <p>I am able to log the error messages for the assertion failures by doing the following in groovy script:</p>
  
  <pre><code>def soapStep = testRunner.testCase.testSteps["SoapRequestStep"]
  for( assertion in soapStep.assertionList )
  {
     if(assertion.errors != null)
     {
         for( e in assertion.errors )
         {
             log.info ${e.message}
         }
     }
  }
  </code></pre>
  
  <p>However, what is the way to get the error messages for a test case failing for reasons other than assertion failures. For example,</p>
  
  <pre><code>testRunner.fail("Request File is empty")
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>throw new Exception("foo")
  </code></pre>