How to Add Parameters in Apache JMeter | Loadium

How to Add a Variable Number of Parameters in Apache JMeter

Some requests have more than one parameter, and the number of parameters may change. You can also add dynamic parameters according to your…

How to Add a Variable Number of Parameters in Apache JMeter

Some requests have more than one parameter, and the number of parameters may change. You can also add dynamic parameters according to your scenario. To resolve this issue, we need to use JSR223 PreProcessor provided by Apache JMeter.

First, we add an HTTP request as shown below, then we delete all the parameters and add JSR223 PreProcessor.

In this example, we choose the groovy language.

Then we add a for loop to determine how many parameters we will add, and add the parameter insert code to use it inside the for a loop.

When we run the test, we add any number of parameters as shown in the figure.

Find this article helpful? Check out Loadium for more!

Latest articles

All Articles →

Postman Alternatives for Api Testing

Postman Alternatives for Api Testing

How To Use Json Extractor in Jmeter

How To Use Json Extractor in Jmeter

What Is Multi Location Load Testing

What Is Multi Location Load Testing