Performance testing a web app using Jmeter


Keywords:testing 


Question: 

I'm new to jmeter, i tried performance test a web app using it,

It has 4 pages,

Login page(Http Authorization Manager)
Page 1
Page 2
Page 3

Here, when i use my app in real time it take too much time(> 2 sec) to load from one page to another. But, in jmeter the results shows that the pages loads in quick time(avg time - 668 ms).

Is it hitting the pages individually?(i.e, from login page to page 1 and login page to page 2, etc)

What i wanted to know is, for the below scenario how my app performs with more samples.

Sequence : Login - goto page 1 - click on a link - goto page 2 - click on a link- goto page 3

Or Is there any way to record a sequence and do a load test with 100 users or so?


1 Answer: 

Here, when i use my app in real time it take too much time(> 2 sec) to load from one page to another. But, in jmeter the results shows that the pages loads in quick time(avg time - 668 ms).

There are some reasons why JMeter is faster:

  • Jmeter opens only html page, browser opens page with pictures and with another stuff
  • Jmeter doesn't render html and JS, but browser does

Make some changes to your JMeter script:

  • Add HTTP Cookie Manager
  • Add HTTP Cache Manager
  • Add HTTP Request Defaults
  • Move Login page as child into Once Only Controller (as you won't login each time, right?)