Forum Discussion

eissaeva's avatar
eissaeva
Contributor
4 years ago

Which jar files were added to resolve this?

Hi community,

I run into the same error while using Diff class in groovy ReadyAPI version 3.8.0

 

def actualResponse = testRunner.runTestStepByName("postQueryWithSFGraphIdAndBlankConstraint").getResponse().getContentAsString()
def expResponse = context.getTestCase().getPropertyValue("gp")

 

JSONObject parseJsonAct = (JSONObject) new JsonSlurper().parseText(actualResponse);
JSONObject parseJsonExp = (JSONObject) new JsonSlurper().parseText(expResponse);

 

// Create an object with differences between documents
Diff myDiff = new Diff(parseJsonAct, parseJsonExp)
DetailedDiff diff = new DetailedDiff(myDiff)

 

I researched and found this post. Just not able to reply and ask which jar files were missing?

https://community.smartbear.com/t5/SoapUI-Open-Source/org-codehaus-groovy-control-MultipleCompilationErrorsException/m-p/132672#M22605

 

My error attached

 

Ekaterina

 

 

 

 

 

  • nmrao's avatar
    nmrao
    Champion Level 3
    You can use groovy.json.JsonSluper class. No additional library is needed.
    • eissaeva's avatar
      eissaeva
      Contributor

      I am already using it as you can see from the code sample I sent but still getting the error

       

      These are my imports

       

      import groovy.json.JsonSlurper;
      import org.json.JSONObject;

      • nmrao's avatar
        nmrao
        Champion Level 3
        Why "import org.json.JSONObject;' is needed?