Search code examples
cross-browserjmeterperformance-testing

how to simulate different browsers in jmeter load run?


Is it possible to simulate a load run in different desktop browsers & their versions using Jmeter? I knew that by using "Retrieve All Embedded Resources from HTML Files" & "Use concurrent pool. Size=" options we can simulate a real browser but my requirement is to simulate a specific browser. If possible, could someone please provide the steps to achieve it?


Solution

  • Use HTTP Header Manager to send User-Agent header with the value of browser you want to mimic.

    You might also want to add HTTP Cache Manager and HTTP Cookie Manager in order to simulate browsers more closely.

    Also consider using Throughput Controller if you looking for a form of distribution, i.e. 60% Chrome, 20% Safari, etc. see Running JMeter Samplers with Defined Percentage Probability guide for more details.

    And remember, JMeter doesn't actually "render" the page, it downloads response as plain text so you won't be able to detect any rendering issues. It neither executes JavaScript.