title: How do I log the request and response in soapUI?
body: <p>I am calling a REST based service from SoapUI. I have created a load test for the service and the test works. I wrote the following code in my setup script for the load test.</p>
  
  <pre><code>log.info("This is from the setup script")
  def request = context.expand('${#Request}')
  log.info(request)
  def response = context.expand('${#Response}')
  log.info(response);
  </code></pre>
  
  <p>The only item I am getting in my log is the "This is from the setup script". 
  I also added the following lines of code in my Teardown script.</p>
  
  <pre><code>log.info("Teardown script")
  def response = context.expand('${#Response}')
  log.info(response);
  </code></pre>
  
  <p>I am not seeing the "Teardown script" text in the log. At this point I am a bit puzzled as to the behavior.</p>
  
  <p><strong>Load Test:</strong>
  <img src="https://i.stack.imgur.com/0T3Aq.png" alt="This is my load test"></p>
  
  <p><strong>Test Suite</strong></p>
  
  <p><img src="https://i.stack.imgur.com/VSgZp.png" alt="This is my test suite"></p>
  
  <p><strong>Test case options.</strong> 
  I have unchecked the Discard OK results test box.
  <img src="https://i.stack.imgur.com/mdJl4.png" alt="Test case options"></p>
  
  <p>What changes do I need to do to my scripts in order to log the requests and the responses?</p>