How to know which request failed for which user in jmeter - jmeter

My jmx file has 30 requests , 30 users, and response data may very according to the user logged. I am using view result tree as listener, my question is how to know for which user for which a request failed to get a response from server?

There are multiple options, to provide exact solution we need to know more details.
JMeter provides information about thread (virtual user) number as "Thread Name"
You can append the relevant JMeter Variable to the sampler name:
N.B. Don't use View Results Tree listener for anything but tests development and debugging as it is very resource intensive, when it comes to load test execution it will consume lots of the RAM and it may ruin your test. Run you test in command-line non-GUI mode and use listeners to analyse the results file after test completion. More information on JMeter tuning for the maximum performance: 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure

Related

Jmeter CLI stops tests after sometime. Any ideas?

When I run Jmeter from Windows CLI, after some random time, the tests are being stopped or stuck. I can click on ctrl+C (one time) just to refresh the run but part of the request will be lost during the time it was stuck.
Take a look at jmeter.log file, normally it should be possible to figure out what's wrong by looking at messages there. If you don't see any suspicious entries there - you can increase JMeter's logging verbosity by changing values in logj2.xml file or via -L command-line parameters.
Take a thread dump and see what exactly threads are doing when they're "stuck"
If you're using HTTP Request samplers be aware that JMeter will wait for the result forever and if the application fails to respond at all - your test will never end so you need to set reasonable timeouts.
Make sure to follow JMeter Best Practices
Take a look at resources consumption like CPU, RAM, etc. - if your machine is overloaded and cannot conduct the required load you will need to switch to distributed testing
There are several approaches to debugging a JMeter test which can be combined as a general systematic approach that I capable of diagnosing most problems.
The first thing that I would suggest is running the test within the JMeter GUI to visualize the test execution. For this you may want to add a View Results Tree listener which will provide you with real time results from each request generated:
Another way you can monitor your test execution in real time within the JMeter GUI is with the Log Viewer. If any exceptions are encountered during your test execution you will see detailed output in this window. This can be found under the Options menu:
Beyond this, JMeter records output files which are often very useful in debugging you load tests. Both the .log file and the .jtl file will provide a time stamped history of every action your test performs. From there you can likely track down the offending request or error if your test unexpectedly hangs:
If you do decide to move your test into the cloud using a service that hosts your test, you may be able to ascertain more information through that platform. Here is a comprehensive example on how to debug JMeter load tests that covers the above approaches as well as more advanced concepts. Using a cloud load test provider can provide your test will additional network and machine resources beyond what your local machine can, if the problem is related to a performance bottleneck.

JMeter - returns 401 unauthorized for few test

I am using jmeter to load test a website. I have tested from 1 to 400 users. however while testing for above 500 users/threads, I am getting 401/unauthorized error for few users. Hope you'll help me to find out a solution to this problem.
I can think of 3 possible reasons:
There is a parameterization problem with your test, i.e. it sends wrong credentials, you can use i.e. Simple Data Writer configured to save requests and response data for failing requests and inspect it using View Results Tree listener.
JMeter gets overloaded and cannot properly perform correlation. In addition to point 1 check whether you're following JMeter Best Practices and ensure that JMeter has enough headroom to operate in terms of CPU, RAM, etc. using i.e. JMeter PerfMon Plugin
Your application gets overloaded and cannot handle 500+ users, check your application logs, resources usage, output of APM tools, etc.

Jmeter run : Java heap space error : out of memory error

I'm getting the following error:
out of memory error : java heap space error while running jmeter script for long run say 20 hrs.
I have set 10 GB heap size to run 10 threads only.
Could it be my application's bug? How can I be sure that this is application's bug not a jmeter issue?
JMeter is a Java application with a GUI. It also supports a non-GUI mode which is less resource intensive(CPU/RAM). If we run JMeter in non-GUI mode, it will consume less resource and we can run more threads.
Disable ALL Listeners during the Test Run. They are only for debugging and use them to design the desired script.
Listeners should be disabled during load tests. Enabling them causes additional overheads, which consume valuable resources that are needed by more important elements of your test.
Use Up-to-Date Software:
Java and JMeter should be kept updated.
Decide Which Metrics You Need to Store:
When it comes to storing requests and response headers, assertion results and response data can consume a lot of memory! So it is wise try not to store these values on JMeter unless it’s absolutely necessary.
JMeter SaveService badly configured: Check if you are saving requests and responses in your JTL.
For better and more elaborated understanding, this blog about 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure is helpful.

website benchmaking tool with automatic mail support

I'm looking out for a tool that supports recording option in web on the tasks that I perform (search and result analysis).
I finally rerun the recorded script and calculate the time that is taken for each page that is loaded (generally based on the search criteria) within the web.
Once the page loading exceeds the defined time, the exceeded time should be highlighted.
The reports on this should be automatically saved.
The above scenario was tried using jmeter, but I was not able to set benchmark and automatically set the scenario as failed when the page load exceeds the defined number.
Please suggest a tool that could be used for the above mentioned scenario, and if the same could be done using Jmeter that I'm missing out.
Thanks in advance..!
In JMeter you have :
Duration Assertion which you can utilize to set the response time threshold. If response time exceeds the time set in the duration assertion JMeter will automatically mark the relevant sampler(s) as failed
SMTP Sampler which can be used for sending JMeter test results to the specified recipient(s). Add a tearDown Thread Group to your Test Plan (tearDown Thread Group is being executed after all other Thread Groups), put SMTP Sampler under this tearDown Thread Group and configure it to send .jtl results file at the end of the test. See Load Testing Your Email Server: How to Send and Receive E-mails with JMeter article for example configuration.

Jmeter & browser concurrent requests showing different results?

When I have given 500 concurrent users load via jmeter my server throwing error message but the same time I have called same request via browser showing proper response. How it is possible? Is there any settings in jmeter for avoiding same.
It is hard to say what can go wrong without seeing your JMeter configuration, full server response, JMeter and application under test logs and network dump for browser and JMeter.
The whole idea of performance testing is mimicking real user as close as possible, so you need at least
Add HTTP Request Defaults and set JMeter to:
Download embedded resources
Use concurrent pool of 2-5 threads
Add HTTP Cookie Manager
Add HTTP Cache Manager
Add HTTP Header Manager
Correlate any dynamic parameters
Simulate any specific application behaviour (i.e. AJAX calls)
etc.
In addition to above recommendations: ideally given "good" JMeter you shouldn't see any "response messages", you should see a number of errors in final report so double check you:
Run JMeter in non-GUI mode
Storing only those metrics which are absolutely required
Follow other recommendations from 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure
beside, what Dmitri described above, I would also check the actual throughput the server returns in either cases.
Throughput depends a lot on the timers you configured in Jmeter to simulate think time.
Jmeter has no rendering and no javascript engine, so each thread is much much faster than a real browser.

Resources