how to store error info occuring during loadtest in Jmeter - jmeter

During the load test http 5XX or 4XX occur. the summary report show the error% but i see no way to see the details of the error.
usually in other load testing tools i am able to generate error graph which shows when it occurred and the request and response details.
In jmeter what do i have to do to capture this information for later analysis.
I tried to use "tree result listener" but this is usually good for one user run for debugging purpose and not for on load.

You got error details with "view result tree". If you want see error then you have to check "Log/Display Only: Error".
You can display various information with "Graph", but the "Graph" in Jmeter is very limited.
You can capture information in different Formats XML or CSV. You have to add "Report" then you can configure what you want to capture.

Related

Jmeter test failed with only 5 thread

I am new into Jmeter and trying to do my first load test, When I get my data from website it is always come in .txt form and when this data I try to run my test it fails,
It's hard to say what is wrong without seeing the "Sampler result" tab screenshot for at least one failed sampler.
Going forward consider providing as much information as you can, i.e.:
Screenshot of the HTTP Request sampler
Screenshot of the View Results Tree listener demonstrating Sampler result, request data and headers and response data
At least relevant parts of the jmeter.log file, better with the debug logging for the test elements involved enabled

handling dynamic pop-up error message in jmeter

I have a Jmeter script for an application for which i get pop up error message intermittently. Where as in jmeter we only come to know that flow got terminated by some failure.But we wont come to know the occurrence of Error pop -up message.
My requirement is if we encounter pop up error i want to write to an external file saying that ,the current page got failed due to pop-up error message.
If we can write the error message it's really great. I'm as of now not getting idea to achieve this.
Please can anyone help me in this. or can provide any hint to do R&D.
Thankyou in advance.
Updated the question with screen shot of error message.
As per JMeter project main page:
JMeter is not a browser, it works at protocol level. As far as web-services and remote services are concerned, JMeter looks like a browser (or rather, multiple browsers); however JMeter does not perform all the actions supported by browsers. In particular, JMeter does not execute the Javascript found in HTML pages. Nor does it render the HTML pages as a browser does (it's possible to view the response as HTML etc., but the timings are not included in any samples, and only one sample in one thread is ever displayed at a time).
Looking into your screenshot, it is a form of JavaScript popup, most likely window.alert so there is no way to detect it via JMeter.
You can add i.e. Response Assertion to your test in order to introduce some pass/fail criteria, i.e. if you were in the middle of some transaction when the error occurred it should not finish successfully resulting in missing expected entry in the web page (or database), so you can conditionally fail relevant sampler(s) in this case. See How to Use JMeter Assertions in Three Easy Steps to learn more about the concept.
Alternatively you can use WebDriver Sampler plugin which provides JMeter integration with Selenium browser automation framework which drives a real browser, so you will be able to capture this popups and record the page titles/take screenshots, check out IsAlertPresent() class for more information.
you must get this error response in your jmeter request response.simple answer.Have a regex to extract.

Teamcity jmeter Performance Metrics Calculation: Check reference values

I have setup TeamCity with JMeter plugin. Under Build Configuration -> Build Features, I selected 'Performance metrics calculation'. I can see the build log is cumulative with previous execution results. However, when checking for failure conditions in the build log for 404 or 500 status code, it always fails if at least one previous instance has these response codes. Without this, the build always says Pass even if there are couple of requests that fail with error codes.
Under 'Check reference values', is it possible to set reference values to check the metrics against responsecode for errors? The only available options are 'Average', '90% line' and 'Max'. Any insight into how I can add options to select and search for error response codes?
Screenshots attached for reference
Thank you.
TeamCity JMeter Performance Metrics Collection
The plugin is open source so theoretically you should be able to add required metric to check.
As a workaround I can suggest using Response Assertion to check response codes. If you need to test only "200" status code - it will be the matter of only one assertion (same level as HTTP Request samplers).
See How to Use JMeter Assertions in Three Easy Steps article for more details on conditionally failing JMeter requests

Don't report missing "Embedded Resources" as error in jMeter

In a sample, I checked "Retrieve all Embedded Resources" but now my sample reports an error if a linked resource is missing (HTTP status 404 from the server).
Can I tell my sample to retrieve the embedded resources but to ignore missing or problematic linked resources ? (so I can stop the unit only if a real functional problem occurs, and not when an image is missing)
One possibility is to edit ./bin/jmeter.properties and set httpsampler.ignore_failed_embedded_resources=true as fixed by Bug 44301.
You can work it around using JMeter Assertions
Add a Response Assertion as a child of the sampler which produces 404 code
Configure it as follows:
Apply to: check Main sample and sub-samples
Response fields to test: check Ignore status
In this case erroneous statuses of mail sampler and its children will be ignored.
See How to Use JMeter Assertions in 3 Easy Steps for more information on pass/fail criteria definition via Assertions

What other 5xx errors could be occuring and how to I find/track them?

I have a Classic ASP/VBScript site running on IIS 6, and a program called SmarterStats (found via an earlier question) providing various stats and info from the server logs. This is an internal site, and we do use integrated authentication (AUTH_TYPE = Negotiate).
I'm looking at the report on response codes, and it says that in the last 7 days there have been 255 responses with a 5xx error code... naturally not the most useful stat I could get back.
I have a custom error page for 500 and 500.100 errors that logs the specifics for me to follow up on - and that log is virtually empty. I've tested with an intentionally broken page, and a standard user account, and it is working as expected - custom message, log entry made. (and checked with "friendly error messages" on and off - works either way)
The only entry I have in the log is a single entry for an error -2147024843 (authentication related, took too long to get a response), and that's it... what other errors could be happening and how can I find/track them?
Should I route all the different types of 5xx errors through my custom page? Or is there something else I should be doing?
Resolution: I'm going to go with running all 5xx errors through the custom page. For reasons that leave me totally baffled, the errors have stopped... I've not changed anything, no one has changed anything on that server - but the errors have stopped. Go figure.
It seems like logging all 5xx errors via your custom page might be a good idea. Your logging seems to be working, but SmarterStats seems like it might be giving you bogus data?
What version of SmarterStats are you using?
My hosting provider has Version 5.2 and I can see a detailed list of which pages have produced a 5xx error by going to Report Items > Server Responses > 5xx - Server Errors in the navigation tree. The report that gets displayed has a table listing the pages that have produced the error codes so you can then go investigate those pages to see what may be causing the error.
Depending on your site the error might be perfectly normal, for example I have some custom HTTP handlers which implement a standardised HTTP protocol which actually specifies that 5xx errors should be thrown under certain circumstances.
Though this shouldn't apply to an internal only site on public websites it is sometimes the case that badly written crawlers will access your pages in such a way as to produce an error

Resources