0
votes

I am running a Jmeter Test Plan with an HTTP Request, to test the performance of a web service.

In my test, I need a variable named REF to be changed in the body data of my HTTP Request. REF can have 3000 values. So I have created a CSV file with all these 3000 values, a CSV Data Set Config, and a parameter in Jmeter named REF, and I use it in my HTTP Request like that :

<measure>
    <measureRef id="${REF}"></measureRef>
    <measureTime>${__time(yyyy-MM-dd'T'HH:mm:ss)}</measureTime>
    <measureVal>
        <value>${__Random(1,100,)}</value>
    </measureVal>
</measure>

As you can see it in this XML, I use the functions time and Random of Jmeter to have different requests everytime I run the test plan.

I would like yo run the test plan automatically for all the 3000 values of REF. To do that, I tried to configure the thread group like this : Number of Threads = 3000 and Loop Control = 1.

The problem is that the test takes 3 minutes to be done. So I would like to know if there is another way to do. The thing is that I need the test to be done for all the differents 3000 values in my CSV, and I don't see another way to do. I tried to put another measure in my Body Data, like this :

<measure>
    <measureRef id="${REF}"></measureRef>
    <measureTime>${__time(yyyy-MM-dd'T'HH:mm:ss)}</measureTime>
    <measureVal>
        <value>${__Random(1,100,)}</value>
    </measureVal>
</measure>
<measure>
    <measureRef id="${REF}"></measureRef>
    <measureTime>${__time(yyyy-MM-dd'T'HH:mm:ss)}</measureTime>
    <measureVal>
        <value>${__Random(1,100,)}</value>
    </measureVal>
</measure>

But the value of REF that is used this the same in the two measures, and what I want is to have different values picked in the CSV.

I also tried to configure the Thread Group like this : Number of Threads = 1 and Loop Control = 3000. But it's not working, I have a lot of errors...

I want the test to be runned quickly because to test my web service, I'd like to inject the 3000 values every 1 minute (by using a Flow Control Action maybe). And if the test runs in 3 minutes, I would be too long, and all the values would not be tested...

Thank you for your help !

2

2 Answers

0
votes

If you are using 2 data in 1 request then you can use max 1500 virtual users if you are not repeating your data.

If it is fine then add 2 columns in csv file like REF1 and REF2 and each column will have 1500 data. Then you can use ${REF1} and ${REF2} in your requests.

0
votes

If it takes you 3 minutes to add 3000 values with 3000 users and you need this to be done in 1 minute I can think of 2 possible causes:

  1. Your application cannot process the requests faster. You can try increasing number of threads i.e. to 9000 in the Thread Group and see whether it helps or not. If you still have this 3 minutes processing time - it's your application to blame
  2. JMeter is not capable of sending requests fast enough.

    • First of all make sure to follow JMeter Best Practices
    • Then make sure to monitor the health of the machine where JMeter is running using i.e. JMeter PerfMon Plugin as JMeter must have enough headroom to operate
    • If a single machine cannot produce 3000 requests per minute - you will have to go for Distributed Testing