3

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:

sebenalern
  • 2,515
  • 3
  • 26
  • 36
Jose
  • 155
  • 2
  • 8

1 Answers1

2

Not sure why you need it, maybe you just need to follow steps from JMeterSocketClosed wiki page, but here you go:

  1. Add Beanshell Listener to your Test Plan
  2. 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

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • Thank you Dmitri, I love your contribution in blazemeter. I read a lot of articles you have written about performance testing and jmeter.. Thanks – Jose Jun 04 '16 at 21:48