0

I'm new to JMETER and have some questions and confusions. It would be great if anyone can help me.

Following is the list of confusions :

  1. Average response time calculation: I was testing a website’s home page to calculate the average response time, i.e. how much time the page takes to load when ‘x’ no of users hit the page simultaneously (ramp up zero)? I hit the home page of the website and I found that page loaded completely in 12-13 seconds. Now in JMETER, I made 10 users to hit the home page instantaneously (RAMP UP zero ), but the average response time came out was less than 1 second (Average was 604 in summary report and graph result), which surprised me because that’s not possible/acceptable that average respond time is less than 1 second. This made me think that I’m calculating average response time in an incorrect manner. Please check check snapshots here and guide me in the right direction:

enter image description here

enter image description here

  1. How does login script works in Jmeter? The scenario is that I recorded the script in the browser using JMETER proxy server in which I logged in the application using a user’s login credential (Email id and password). Now, I made JMETER to run the same script for 100 users. Now, my confusion and question is that, how JMETER runs the same script of 100 virtual users using the same login credentials, considering the fact the application does not allow multiple logins of user’s with the same login credentials, which means if the user is logged in the application, he cannot login into the application elsewhere. Please help and guide.

  2. Throughput Calculation confusion: Throughput is transactions/requests per time. So these requests mean successful transactions only or failed transactions are also counted? I mean if we send 100 requests/minute to server and server is only able to handle 60 requests/minute and giving error for rest 40, then throughput would be 60 requests/minute or 100 requests/minute.

  3. CSV Parameterization error: The scenario is that I recorded the script in the browser using JMETER proxy server in which I logged in the application using a user’s login credential (Email id and password), and then went to edit profile and performed actions. Now, I made the JMETER to run the same script for 10 users using Parameterization, and, out of these 10 users, I entered wrong credentials for 5 users in the CSV file. Now my confusion is that how the scripts/HTTP requests post login ran without any error, for all those users who login credentials were wrong.

5.Recording scripts: Sometimes while recording scripts for HTTP protocol, not all the scripts are recorded by JMETER. Like only PHP files are visible,CSS, JS requests are not visible. And, while recording the same website, CSS,JS, requests are also visible. Please check the images below :

[![enter image description here][3]][3]

[![enter image description here][4]][4]

I know I have asked many questions at once, but it would be a great help if you could help me in clearing my doubts.

1

There could be different reasons hence different workaround, the most obvious are listed below:

  1. JMeter calculates response time quite well. You're getting lower response time as you are not downloading embedded resources like images, scripts, styles, etc. Add HTTP Request Defaults and configure it to

    • Download Embedded Resources
    • Use 2-5 concurrent threads for that

    Also see How To Make JMeter Behave More Like A Real Browser guide for more tips on making your JMeter test as realistic as possible.

  2. You should all HTTP Cookie Manager to represent user session. And it is required to use different credentials for every virtual user, you testing should be as realistic as possible

  3. According to JMeter Glossary:

    Throughput is calculated as requests/unit of time. The time is calculated from the start of the first sample to the end of the last sample. This includes any intervals between samples, as it is supposed to represent the load on the server.

    The formula is: Throughput = (number of requests) / (total time).

  4. JMeter doesn't check pages for errors if HTTP Status Code is below 400 - JMeter considers request successful. You can Response Assertion to check whether response contains what it should or doesn't contain what it should not

  5. Clear your browsing history before recording. It may be due to caching of images, scripts and styles (browsers download them only once, on subsequent requests images are being returned from browser's cache). Actually you shouldn't be recording this stuff, it's better to get it via Download Embedded Resources.

0

You don't know that the tests ran without error because you are not looking at the response. Add the Listener "view results tree". That will allow you to see the requests and responses. It can be helpful to change the dropdown to "HTML" to see the actual page in the response. Be sure to remove/disable the results tree if you start running sustained tests though (the log can get very large).

Logging in with different accounts can be a problem. You can clear cookies before each run in the HTTP Cookie Manager in order to force a log in screen. That will allow you to ensure you are on the right page before attempting to log in.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.