Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Don't report missing "Embedded Resources" as error in jMeter

Tags:

jmeter

In a sample, I checked "Retrieve all Embedded Resources" but now my sample reports an error if a linked resource is missing (HTTP status 404 from the server).

Can I tell my sample to retrieve the embedded resources but to ignore missing or problematic linked resources ? (so I can stop the unit only if a real functional problem occurs, and not when an image is missing)

like image 772
Anthony O. Avatar asked Oct 01 '14 12:10

Anthony O.


People also ask

How do I ignore embedded resources in JMeter?

Senior Software Engineer - QA Here is a quick solution I tried to ignore the embedded resource failure so that parent samples are not marked as failed. Go to your JMeter file folder where it is installed, navigate to bin > jmeter. properties. Change the property value to True and uncomment it.

Why does JMeter retrieve embedded resources in parallel?

The answer is that the secondary requests are made in parallel threads. When we select the option Retrieve All Embedded Resources, there is another option next to that checkbox that allows us to set the number of parallel downloads, meaning the number of threads requesting the embedded resources.

What is response assertion in JMeter?

Assertion in JMeter is used to validate response of the request, that you have sent to the server. Assertion is a process where you verify expected result with the actual result of the request at run time. If you need to apply assertion on a particular Sampler, then add it as a child of that Sampler.


2 Answers

You can work it around using JMeter Assertions

  1. Add a Response Assertion as a child of the sampler which produces 404 code
  2. Configure it as follows:

    • Apply to: check Main sample and sub-samples
    • Response fields to test: check Ignore status

Response Assertion

In this case erroneous statuses of mail sampler and its children will be ignored.

See How to Use JMeter Assertions in 3 Easy Steps for more information on pass/fail criteria definition via Assertions

like image 54
Dmitri T Avatar answered Sep 18 '22 08:09

Dmitri T


One possibility is to edit ./bin/jmeter.properties and set httpsampler.ignore_failed_embedded_resources=true as fixed by Bug 44301.

like image 35
Anthony O. Avatar answered Sep 17 '22 08:09

Anthony O.