title: Loop through all test cases and test steps in SOAP UI using Groovy Script
body: <p>As part of the Test Suite teardown process, I want to loop through all the Test Cases and Test Steps that were run previously and capture the results and the assertions.  I'm not very good at groovy script, this seems like it would be straight forward to do, but so far it hasn't gone well.  This mainly because I am not familiar with the object model and there is no "intellisense" to guide me.  I just need a shell to start out with.</p>
  
  <p>Also, I have a loop that executes the same test step multiple times feeding in a different set of data.  I am not sure if that makes a difference.</p>
  
  <p>Here's my shell:</p>
  
  <pre><code>def testCases = context.testCase.testSuite.getTestCaseList()
  testCases.each
  {
      log.info "~~~Test Case:" + it.name
      for(testSteps in it.testStepList)
      {
          log.info "~~~Test Step:" + testSteps.name
      }
  }
  </code></pre>
  
  <p>But I am getting this error...
  <code>Wed Nov 04 15:53:44 EST 2015:ERROR:An error occurred [Cannot get property 'testSuite' on null object], see error log for details</code></p>