1
votes

How can i distribute networks while load testing in JMeter?

Suppose my load test is of 1 hr. and i have 100 users. I want to distribute network like- 20% users - 2G speed 40% users - 3G speed rest - 4G speed.

OR, other scenario like throughout the whole test of 1hr. 20% traffic will on 2G speed, 40% traffic on 3G and rest on 4G speed.

Can anyone tell me that how to mimic this network behavior in JMeter?

1

1 Answers

0
votes
  1. You will need to kick off 3 JMeter instances in Distributed Mode
  2. For 1st JMeter instance add the next lines to user.properties file to mimic 2G network:

    httpclient.socket.http.cps=6400
    httpclient.socket.https.cps=6400
    
  3. For 2nd JMeter instance add the next lines to user.properties file to mimic 3G network

    httpclient.socket.http.cps=2688000
    httpclient.socket.https.cps=2688000
    
  4. For 3rd JMeter instance add the next lines to user.properties file to mimic 4G network:

    httpclient.socket.http.cps=19200000
    httpclient.socket.https.cps=19200000
    

More information: How to Simulate Different Network Speeds in Your JMeter Load Test