jasleen
jasleen

Reputation: 235

How to use multiple checkboxes in jmeter?

In my script i have multiple checkboxes,upon selecting which it populate values(like in first group -- Phone,tablets and in other group it --mac,android).I know that jmeter does not support javascript.If i want to automate it in my script that it selects random checkbox during execution.How can i do that?

Upvotes: 2

Views: 1366

Answers (1)

RaGe
RaGe

Reputation: 23785

There are two ways webpages handle dynamic data population.

  1. Pre-caching

All the needed data is fetched from the server during the initial page load, and as the user makes selections, checkboxes or drop-down boxes or tags etc, the data is filtered on the client end and presented to the user. All of this happens through JavaScript execution on the front end and there is no server interaction. If you used JMeter proxy to record the page load, the pre-load should already be included in your test.

In the traditional JMeter testing sense, the subsequent UI interactions cannot be tested with JMeter - as there are no server interactions to simulate. However you can use the web-driver plugin to simulate and measure UI interactions if you so desire, with certain performance caveats as noted on the plugin webpage.

  1. Lazy Loading

Only a minimal amount of data is fetched during page load, and when the user makes a selection a HTTP call (usually a XHR call) is made to fetch additional relevant data from the server. You can use JMeter proxy, fiddler, wireshark or any other HTTP inspection tools to capture the information in this call and convert it to a JMeter HTTP sampler.

The HTTP request url or body should contain parameters indicating what selection the user made in the UI, You need to parametrize/randomize this value to simulate random checkbox selections.

Upvotes: 3

Related Questions