Reputation: 155
I have a sticky application and i cant use IP spoofing or things like that. So I get No HTTP response code error in the long run.
I want jmeter to ignore this error particular error but be capable of calculating other HTTP error such as 429 Too Many Requests , 404 Not Found, 5xx errors and so on and on. However how to make jmeter able to just ignore one particular error.
The following is my error i am getting, I need a way so that jmeter ignores this error but carries on calculating other types of error.
Pic:
Upvotes: 3
Views: 2958
Reputation: 168002
Not sure why you need it, maybe you just need to follow steps from JMeterSocketClosed wiki page, but here you go:
Put the following code into the Beanshell Listener's "Script" area:
if (sampleResult.getResponseMessage().equals("Non HTTP response message: Connection reset")) {
sampleResult.setSuccessful(true);
}
sampleResult
is a shorthand to HTTPSampleResult class instance which provides extended read/write access to all appropriate methods and fields.
See JavaDoc for more information and How to Use BeanShell: JMeter's Favorite Built-in Component article for comprehensive guide on using JMeter and Java API from Beanshell test elements in your JMeter test
Upvotes: 3