Forum Discussion

yognsal's avatar
yognsal
Occasional Contributor
7 years ago
Solved

How i can save only limited (say first 100 lines) SOAP UI response in excel sheet using groovy scrip

I want to save only first 100 lines from response which is in JSON format.   Because when my response is too big then excel can not hold the entire response in one cell. so it gets crashed, and i ...
  • JHunt's avatar
    7 years ago

    The script I gave you updates all Test Cases in the same Test Suite (as the script).

     

    You can go one step further out if you want to update all Test Cases in all Test Suites in the current Project:

     

    testRunner.testCase.project.testSuites.each { testSuite ->
     testSuite.value.testCases.each { testCase -> 
      testCase.value.testSteps.each { 
       def testStep = it.value
       if (testStep instanceof com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep) { 
        testStep.testRequest.setDiscardResponse(true)
       }
      }
     }
    }