Highlighted
Contributor.
Contributor.
701 views

LoadRunner Script Retrieve HTTP response value

For a web page application performance testing

I record the login process in scripts but failed when I replay.

After browser send the credential to server to authenticate, the target server response a SOAP in body of HTTP response. For any action client browser takes after that needs to send 2 tokens (hashed) back to server to show it's authenticated. In normal excerising, those 2 tokens are generated by a javascript which will be invocated when user client any links or button. I know the algorithm of token generation, In LR script, I need to let script to send out those 2 token headers. I think there are 2 solutions:

1) Customize script to retrieve SOAP body in reponse first and then generate tokens to enclose in request. I have the blocker issue: how to retrieve SOAP body in script? or how to access parameter in script (seems response can be stored in parameter)?

2) To invocate the javascript in script, this seems more complicated, because you have to ask LR to call javascript for all actions, how to customize the script in this way?

anybody can help me on this?

Thanks,

Song

0 Likes
1 Reply
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: LoadRunner Script Retrieve HTTP response value

Hi,

I suggest either using web_js_run function or using JavaScript as the script language all together and then you can use JavaScript code more intuitively in the script.

Regards,
Shlomi

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.