Which requests can be commented in a transaction in jmeter?
I recorded a script in jmeter. Now,I can see so many requests in one transaction like css, js requests etc.
Can someone tell me which requests can be commented so that when I run the script, it passes and does not affect the results ?
Usually the class called "static" assets. Since these are normally served from a CDN, an does not stress the app server during production deployments.
Originally Posted by shweta1123
Static assets include things like,
* CSS / Style Sheets files.
* Images and Videos (that are not generated by a backend request, like a graph might be something you want to load test, but a button icon might be something you don't need to)
Basically most things that does not need to talk to backend code to generate.
Actually to make your test realistic you need all this external stuff like images, scripts, styles unless they are in the same domain
Things to consider:
- Remove all recorded individual calls to scripts, images, etc
- Configure your HTTP Request Samplers to "Download Embedded Resources" and "Use concurrent pool" of 2-5 threads
- Filter out anything external (like Google Analytics, 3rd-party sites banners and images, etc)
Few more recommendations:
Generally in production, static assets like images, client side scripts, and styles are served off of CDN in most production setup to reduce costs and improve pageload speeds by geographically distributing the assets (application servers are more expensive than CDNs). In many production environments, they're generally just rerouted/redirected off to a CDN subdomain (to provide the illusion they are served from the same domain). So load testing downloading those resources is a waste of resources, especially if you're paying per transaction/minute when running load tests on the cloud. Even if you can't run it on the cloud, you rather spend those extra CPU cycles and network bandwidth to stressing the application servers.
Originally Posted by email@example.com
However on most test systems, because most test environments don't bother to have a CDN in-house, the static assets are served off the same servers as the app servers to same the amount of machines used. So by including those assets, you're actually skewing your results. Load tests should attempt to mimic production setup as close as possible.
Of course what you really need to test will depend on your network topology. So it's good to review the network map of your production setup and what comes from what.
Last edited by dlai; 11-21-2014 at 07:45 AM.