3
votes

I have a requirement to include all resources (images,css,js) to simulate a real browser fetching a web page.

Using the HTTP(S) Test Script Recorder, I expect it to record all resources except those in the URL patterns to Exclude. I've removed all URL Patterns to exclude, as well as checking Retrieve All Embedded Resources for the recording. However, when starting the Thread Group, I see all resources are still not being pulled from the site, for instance some images are retrieved, but not all.

I can't figure out the problem. Is this a configuration issue?

2
So you mean to say that https script recorder is not recording embedded resources ? - Ved
Yes, it only records some embedded resources not all - Imen CHOK

2 Answers

1
votes

i had a situation when images are loaded (in browser), but they are retrieved not from HTML parsing. what i mean here is that there are some JS that parse non-HTML (in my case it's JSON) response and got those image URLs from there. in that situation browser will get those URLs and will load those images (JS is responsible for that). however Jmeter is not a browser, and thus such images will be missed even with embedded resources turned on. in such situation you will need either add such content to your plan as some static data or implement some custom logic that will be responsible for getting those data (for example regexp extractor for all needed resources+For each controller where you will load al)

0
votes

It can record only few types of embedded resources and not ALL. See the documentation for jMeter -

 This sampler lets you send an HTTP/HTTPS request to a web server. It also lets you control whether or not JMeter parses HTML files for images and other embedded resources and sends HTTP requests to retrieve them. The following types of embedded resource are retrieved:

    images
    applets
    stylesheets
    external scripts
    frames, iframes
    background images (body, table, TD, TR)
    background sound

http://jmeter.apache.org/usermanual/component_reference.html