Calculations of the Responses | SOAPUI Forum

Calculations of the Responses

virendra Post on 01/10/2019

hi ,

need help for  the calculations of GET APIs.
1>Step1 : GET - Current Balance 
2>Step2 : POST -Fund 
3>Step3 : GET NEW Balance

how can I calculate the responses  and get the current balance and new balance after funding.

Using the following code.

def currentStepInd = context.currentStepIndex
def previousStep = testRunner.testCase.getTestStepAt(currentStepInd - 1)

myRequestStep = testRunner.testCase.getTestStepByName(
request = new String(myRequestStep.testRequest.messageExchange.rawRequestData)
response = new String(myRequestStep.testRequest.messageExchange.rawResponseData)"Request of API: " + request);"Request of API: " + response);