Is there a way to add parameter to requests for embedded resources in Jmeter?

Viewed 230

I am testing a web application. I use option Retrieve All Embedded Resources with enabled Parallel downloads in HTTP Request settings. I would like to add a parameter to all requests (including requests for embedded resources)

I have tried BeanShell preprocessor and Http requests defaults, as described Is there a way to add a request parameter for all post requests in jmeter? However, the parameter is not being passed to requests for embedded resources.

1 Answers

You need to identify the embedded resources which is required like css,jss,javascript etc and remove that are not required. Then, you can put all those request under bzm@parallel controller to be executed in parallel. In that way you can pass any variable to all the embedded request as they are normal http samplers. You can use HTTP Request default to send one parameter to all request or via coding as shown in the link provided.

enter image description here

For more information check below links:-

https://www.blazemeter.com/blog/web-testing-jmeter-how-properly-handle-embedded-resources-html-responses/

https://blazemeter.com/blog/how-to-use-the-parallel-controller-in-jmeter/

Hope this helps.

Related