Recently in my project, we got a situation to simulate bandwidth in JMeter tool. In LoadRunner, it is pretty easy to simulate, press F4, click on Speed Simulation under Network, select the desired speed level. But it is not straight forward in Apache JMeter.
How to simulate bandwidth in JMeter?
Go to JMETER_HOME\bin folder, open jmeter.properties file in your favorite editor, search for httpclient.socket.http.cps=0.
Uncomment that line and enter your desired bandwidth to simulate. If your application under test is HTTPS protocol, then uncomment httpclient.socket.https.cps=0
Before entering your value in CPS (Character Per Second), use below calculator to convert your kbps to cps. e.g. if your desired bandwidth is 100 kbps, then the cps would be 12800.
Subscribe to our QAInsights YouTube Channel. If you are enjoying our work, please do subscribe our free weekly newsletter or Google feeds.
Hi,
If i want run different bandwidths like 3G,4G,What is the value i need to give?
Hi Naveen,
We have one requirement to execute the load test with 100 concurrent users and each virtual users upload speed is 2Mbps .One upload scenario need to be tested . Our doubt was what will be cps value we need to configure in properties file.
Option 1 (setting as 2Mbps ie the upload speed for each virtual user)
httpclient.socket.http.cps=256000
httpclient.socket.https.cps=256000
Option 2 ( setting for 100 concurent users *2Mbps each = 25600000)
httpclient.socket.http.cps=25600000
httpclient.socket.https.cps=25600000
Could you please help us on this . Thanks in advance.
Hi Lijo,
I have similar scenario. Can you please let us know which option you used to test.
Thank you in advance.