title: How to compare files in soapui through groovy script?
body: <p>I have been able to successfully save the response into and external file - <code>response.json</code>
  Now I need to write a groovy script to compare <code>response.json</code> with <code>baseline.json</code>.</p>
  
  <p>My query revolves around how could I parse <code>baseline.json</code> into a variable, say</p>
  
  <pre><code>def File1 = baseline.json
  </code></pre>
  
  <p>So that later I could compare the two files through groovy.
  This is what I am doing, however I am unable to store external file to a variable, </p>
  
  <p>My groovy script as: </p>
  
  <pre><code>def a = context.expand('${#TestSuite#BaseLineFolder}') + "\\file1.json" //log.info a 
  def slurper = new JsonSlurper() 
  def File1 = slurper.parseText (a) 
  </code></pre>