EXTRARES generally contains non-html resources, Does that need to commented or kept in a script what is the best practice.
Suppose I comment out EXTRARES, and my script gives me some 5 sec as response time, and if I don't if I have 9 sec as response time.
How to I find out that which way is the correct...
CASE 1: Commenting out EXTRARES - suppose 5 sec response time is achieved in loadtesting, whereas in real time if it is taking 7 sec to load completely, then my entire loadtest is a failure if my SLA is 6 and I am getting response time as 5 sec, whereas bottleneck of high response time is not solved with reference to SLA here.
CASE 2: Having EXTRARES - suppose 9 sec response time is achieved with EXTRARES and in real time it takes 6 sec to load a particular page which is within SLA, then my entire loadtest is a failure here since I would be trying to think there is a bottleneck with high response time in loadtest.
So is it best practice to use EXTRARES or not in load testing and what is its impact?
I want to add that this reponse was given by Prashanth Thimmavajjala from another similar topic, however I wanted to share it with you.
- Recording EXTRARES or not recording doens't mean, download or not download those EXTRARES during replay. This just change the way as we see the script.
- What is the best practice? We don't have best practice. This depends on how your application and environment behaves. So that, you can make the script to behave similar to the real browser or application through Run- Time Settings. For example:
1. * What is the browser used in your environment? or the browser used by the users that access the application?
- This can be changed in Run-Time Settings--Browser Emulation. Changing the browser change how the Caché memory is handled, number of concurrent connections, cookies and headers. So, this may affect.
2. * Do the users access the application frequently and have rights to save temp files during the navigation? I
- If so, that means the extra resources are saved in temp files for the browser and they are not downloaded again after the first time. So, downloading the page will be faster. In this case, we can change settings like:
/ Simulate Browser Cache
/ Download non-HTML Resources
/ Simulate a new user on each iteration - Clear cache on each iteration.
3. * Emulate the proper Network Spped in Run-Time Settings--Network-- Speed Simulation
Finally, consider that LoadRunner reports the transaction time from the moment in which client sends the request until the moment in which the last buffer was received from the server. Depending on the application, and of course, the browser, there is an additional time for rendering the page. So, this is client side and is not related to server response. So, we as users can see the application is taking more time than Vugen (commonly).
I hope this helps. Please let me know if you have more questions.
I am trying to understand the 50-100% difference between the Repsonse times of same trasacations based on - including and removal of EXTRARES in the script.
What do you mean by "Recording EXTRARES or not recording doens't mean, download or not download those EXTRARES during replay. This just change the way as we see the script."
Do you mean that when an action is performed at browser end, there will be a request generated for that particular action and it will be processed to the server and from the server end with respect to EXTRARES, the web container will fetch required components and will send them in server response, which are been recorded as EXTRARES in the script.
So while replaying the script these EXTRARES, which are beem recorded in the script are creating additional handshake to the server every time when script runs, like you siad ""Each of them needs an additional GET call to download those resources. Each of those GET are an EXTRARES line ".
whereas eventhough when we comment out/remove these EXTRARES in script.... while replaying the script, the server response by default will contain EXTRARES info which are already listed out in script that are been commented out.
Its really a nice answer . Still i have confusion between the commenting the extrares while replaying . How it is related to downloading the static component. Its very confusing . Please clarify in detail .
I've also noticed that even if EXTRARES have been commented out, resources are still downloaded during vugen replay that were present during recording. (ie images). Can someone answer what defining EXTRARES does vs the "Download non-HTML resources" option in the Run-Time Settings?
Not all static contet is in te Extrares of course, I thought I'd share this for who is interested:
With regards to static content, I have a test on the website where our customers can log in and check their data, bills and paymets etc. where we chose to separat the static and the changing content completely. Beware, this is not the EXTRARES content, when I scripted the wegpage I get a lot of seperate calls to CSS, PGN's and other page elements.
When you go to another page in the application, LR would show in the script those those elements again, like it wanted to download them again during replay. Things like the PNG file with the company logo etc. You can solve that in the settings, but we took another route.
So we took all those elements, and put them in one action, and called it 'static'. The login action then contains only the call to the login.js, with username and password etc.
Now when we replay it, we can time exactly how long it takes to download all the static elements that are reused on each page. And how long the specific pages, like logging in, or going to the users adress data.
To make it complete, we download the static content for the open and the closed section of our site separate, so we can compare that.
Generally I delete EXTRARES part of all web calls. Today I found thats not right thing.
VUgen Records EXTRARES because these resources are not called from main page. They are called from embedded resources such js or css scripts. thats why even if comment out or delete EXTRARES part it still downloads some resources that are referenced in main page.
If you Uncheck Download Non-HTML resources (such as js, css,png, bmp files) then it will only download main web pages.