Correlate in load runner with different type of response body

145 Views Asked by At

While correlation in load runner, For same request some time response is received in json format and other time response received in XML for eg.

Json response:

{"VerificationId": "xyzabc123567"}

XML response be like:

<VerificationId>abcuwn274637</verificationId>

Is there any way to correlate it?

1

There are 1 best solutions below

0
James Pulley On

Set two correlations for two different variables, such as VerifXML, and VerifJSON. Your failed one will be empty. Set the error condition for warning [ "Notfound=warning" ] in the case of a failed correlation.

Assign the non empty collection to a standard loadrunner variable [ lr_save_string(....) ] to continue.