Forum Discussion

wjblazek's avatar
wjblazek
Occasional Contributor
8 years ago

Parsing a huge json body in a groovy step

I have a REST request that returns a HUGE json body, 3.6+M bytes, 76+K lines,

that I need to validate.  I'm using a separate groovy step to do the validation.

The request responds fine and I see the results.

The groovy step can get the response OK too with

testRunner.testCase.getTestStepByName("stepName").httpRequest.response.responseContent

But when it tries to parse the json body with JsonSlurper(),

SoapUI completely locks up forever.

I have to kill the soapui process in the Task Mgr and restart soapui.

So it effectively can't parse this large response to be able to validate it.

 

I've looked online and here at SB and soapui preferences but don't see any info on this.

Is there any way to handle these large json bodies?

I'm using SoapUI OS on a Windows 10 PC.

Can ReadyAPI, SoapUI-Pro, handle large json bodies better?

 

Thanks.

 

 

  • Here are general actions you could do:

     

    • Increase Heap Size, please follow the documentation
    • Use UI tool, to design the test cases, and recommend SOAPUI_HOME/bin/testrunner utility to execute the tests
    • While using UI tool, close unrelated projects in the workspace
  • nmrao's avatar
    nmrao
    Champion Level 3

    Here are general actions you could do:

     

    • Increase Heap Size, please follow the documentation
    • Use UI tool, to design the test cases, and recommend SOAPUI_HOME/bin/testrunner utility to execute the tests
    • While using UI tool, close unrelated projects in the workspace
    • nmrao's avatar
      nmrao
      Champion Level 3
      Can it be closed as "Accept as Soluton"? Still looking for answers?
  • wjblazek's avatar
    wjblazek
    Occasional Contributor

    P.S.

    Some requests return a body so large that soapui locks up on the request itself,

    requiring killing the process and restarting.

    So it's not just groovy scripts, the requests can lock up too.