Categories
apache http-response-codes javascript jmeter stress-testing

JMeter duration assertion Override Response Code

I have a JMeter test plan which executes only 1 HTTP Request for multiple times per Second. As a parameter I have a certain timeout for every request the test executes. For this I have added the “Duration Assertion” Sampler/Listener/ IDK^^

Now I am running the test and I am always getting the response code 200 because the request is OK but the duration assertion is exceeded. That causes that in the results tree there are succeeded and failed requests but all of them have the status code 200. The problem is that in the “Response Codes Per Second” Listener it shows that all requests are OK and have the response code 200. But they are not OK because of the duration assertion!

My Problem: I would like to override the status code of those requests which are failed due to the duration assertion. I want them to be displayed as a different response code (BUT ONLY IF THEY EXCEED THE DURATION ASSERTION) in the “Response Codes Per Second” Listener because I cant distinguish them.
Or is there some way I can make them fail when they exceed the timeout?

I am really sorry for my english and I hope that you can understand my problem. Thanks a lot!