How to ignore broken resource to getting failed HTTP requests in JMeter

Viewed 1087

I'm having trouble with the option Retrieve all embedded resource option in HTTP request Advance tab as it retrieve all resources and if there is any resource broken whole Sampler getting failed. Is there any method to avoide sample getting failed due to resource failures (Ex favi.ico).or is there any similar option as such in Loadrunner : List non critical resource errors as warnings

2 Answers

Failing of the parent HTTP Request sampler by the underlying embedded resource failure is controlled by httpsampler.ignore_failed_embedded_resources property.

If you want to permanently "tell" JMeter to ignore failures of the embedded resources - add the next line to user.properties file:

httpsampler.ignore_failed_embedded_resources=true

If you want the change to be ad-hoc - you can pass the property via -J command-line argument like:

jmeter -Jhttpsampler.ignore_failed_embedded_resources=true -n -t test.jmx ...

References:

In my experience, you should be able to remove the unnecessary resource by using a GET method request with some setting like the HTTP Cookie Manager, HTTP Cache Manager and User Defined Variables.

Related