Reputation: 1
I am having multiple sampler in which i am trying to setup a script which ignores an error message or any response code and tryinh to make a sampler as "pass".
but i am unable to do that.
Below is my configuration.
JMeter Configuration for BeanShell Post Processor
You can see that in an benshell postprocessor i tries to ignore 3 responses (non http , 504 and 401)
But in the "View Result Tree" listner i am still getting ignored status code as failed.
You can see in an image that 401 error code request is failed.
Can you please let me know what i am doing wrong here.
I also tried jsr223 response assertion,but not able to get expected output.
I also checked my logs as well.
Upvotes: 0
Views: 218
Reputation: 168157
There are multiple problems with your script:
==
instead of equals()
which compares references and not instances so it might be the case the code is not executed at all200
is not sufficient to suppress the failure, you need to additionally invoke prev.setSuccessful(true)
functionUpvotes: 0
Reputation: 92
Hello why you use JMeter do you know K6 : https://k6.io/ It's better than JMeter
Upvotes: -3