Highlighted
Trusted Contributor.. Trusted Contributor..
Trusted Contributor..
211 views

Higher response time in Vugen as not able to handle AJAX calls

Hi

I have a web http script for Azure SSO login. The authentication takes manually 3-4 seconds whereas Vugen was taking 12 seconds from the same client machine. When I checked the script there were lot of ajax requests in this transaction but each ajax request was triggered in sequence after few seconds than the previous one. All these ajax requests had an auto header "AJAXRequest" set to TRUE. 

My question is: Is the AJAXRequest auto header supposed to work like this (ultimately leading to higher response time)?

After I enclosed the AJAX requests within concurrent start/concurrent end, I could see the expected response time of 3-4 seconds. Not sure if what I did is correct approach of handling this issue?

Thanks.

0 Likes
3 Replies
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Higher response time in Vugen as not able to handle AJAX calls

Ajax calls are normally generated by java script in a concurrent way. When you replay them in LR as recorded, they are executed in sequence as you noted.

LR is mend to generate load on a back-end server and not to simulate user-based (UI) timings. Note that with multi user testing the difference between running a few steps in sequence vs concurrent is not that critical.

When those Ajax calls do not correlate to each other you can put them in a concurrent section as you tested. You are then getting closer to what a browser might do. But depending on the content of those Ajax calls an end user might not even experience any delays due to those calls.

It might still be interesting to time each of those calls independently when you test setup is for regression. E.g. in our tests we measure each redirect step during authentication separately, for each step involves logic of different development groups. So we can pinpoint changes in delay directly to the right department and prevent discussions.

Success,

Erik

Signature:
Reward community members who take time to respond and help.
0 Likes
Highlighted
Trusted Contributor.. Trusted Contributor..
Trusted Contributor..

Re: Higher response time in Vugen as not able to handle AJAX calls

Thank you for your input. The transaction in question has a mix of synchronous and AJAX requests. I checked fiddler and I could see all these ajax requests have started at the same time (attached screenshot). If LR marked these requests as Ajax, I'm wondering why it failed to start all these calls at the same time. If it was supposed to work in sequence (though there is no dependency with other ajax calls), I guess there is no use of the statement  web_add_auto_header("AjaxRequest","true") ?

0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Higher response time in Vugen as not able to handle AJAX calls

Adding a header to a request is just for the request, because LR detected that this header is used by the application. It has no meaning to LR, so it does not influence the way LR executes.

For LR there is no difference between web_add_auto_header("AjaxRequest","true") or web_add_auto_header("MicroFocus","true"). Both are meaning less to LR.

I know of one exception and that is an "Authorization" header, this header is not propagated to redirects.

Signature:
Reward community members who take time to respond and help.
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.