Reputation: 97
I am struggling for getting the solution.
What I have done:
I have recorded every file the navigating page is generating using HTTP Proxy Server.
Adding all the files under the Thread Group I ran the Test Plan, once with out cache and once with cache.
What I am getting:
But the response time I am getting using Firebug for that page is 30-40 sec less then what I am getting using Jmeter [for cache as well as non-cache].
NB: The page contains ajax.
Question:
Thanks.
Upvotes: 2
Views: 2507
Reputation: 5004
Sometimes the two concepts, load testing and page load speed, get mixed up. Really though they are completely different and should be approached in different ways with different tools.
The best tool to record how long it takes to load a page is a browser. If you combine this with a stopwatch and a suitable sample size you will get some useful data. Seriously, this is a good method, you not only get real results but you also stop the clock when the page is percieved to be loaded, which is really what matters. If you want to automate this process to generate repeatability or you just want finer grain then you should look at functional automation tools (like Seleneum). But this is functional testing, not load testing, if you want to conduct load testing then something like JMeter is very effective.
That said, I suspect that if you are seeing response times 40 seconds greater in JMeter then it could be because you are running a load test using multiple threads? Possibly you are overloading the server and this is why the response times are greater.
Upvotes: 1
Reputation: 1982
As Lee said, JMeter makes requests serially (one after another) whereas the browser will request resources in parallel, opening up to 8 connections at a time to EACH host (so there can be a lot more than 8 parallel transactions taking place on more complex pages). In a nutshell, JMeter is not at all accurate in measuring total page load time. As a result, it is good for placing load on a site or for testing just the page content by itself, but not for measuring realistic page load times or simulating realistic load patterns. For that you'll need a better tool.
Upvotes: 0
Reputation: 713
Jmeter doesn't render the pages, and doesn't do javascript, so it doesn't do ajax either.
However, ajax will generate requests and these requests will be captured by the proxy if you are using it.
The other key difference is that most browsers will do the requests concurrently, usually making 4 to 6 requests at a time, depending on the browser and settings.
Jmeter will make each request serially* rather than in parallel, so this could also potentially add to the total load time for a given page and all of the subsamples for it.
If you look at the request times for each request and add them up, it should come out pretty close
For question two, I would recommend not excluding them, as you want to get an accurate measure of the load, and excluding files will skew your results.
Upvotes: 5