Simulate different network speed in jmeter for performance testing

simulate-different-network-speed-in-jmeter
In today world performance is the key to increase users and users using smartphones,tablet and other portable gadgets and they has different type of internet connection that come with various network bandwidth like 2G,3G, 4G, WIFI etc. we have to ensure performance on smartphone,tablet etc devices other wise user will not use your app or your services.

see below steps to test performance on smartphones,tablet etc.

1. Add below two lines to your user.properties file (you’ll find this file in bin folder of your JMeter installation)

httpclient.socket.http.cps=21888

httpclient.socket.https.cps=21888

You’ll need to restart JMeter to pick these properties up

2. Second technique, you can pass the properties values via the -J command line argument.

jmeter -Jhttpclient.socket.http.cps=21888 -Jhttpclient.socket.https.cps=21888 -t /path/testsampleplan.jmx

cps values are calculated with this formula :

cps = (target bandwidth in kbps * 1024) / 8

Network Bandwidth examples:

Network bandwidth cps value
Mobile data GPRS : 171 kbit/s 21888
Mobile data EDGE : 384 kbit/s 49152
Mobile data HSPA : 14,4 Mbp/s 1843200
Mobile data HSPA+ : 21 Mbp/s 2688000
Mobile data DC-HSPA+ : 42 Mbps 5376000
Mobile data LTE : 150 Mbp/s 19200000
WIFI 802.11a/g : 54 Mbit/s 6912000
WIFI 802.11n : 600 Mbit/s 76800000
Ethernet LAN ; 10 Mbit/s 1280000
Fast Ethernet : 100 Mbit/s 12800000
Gigabit Ethernet : 1 Gbit/s 128000000
10 Gigabit Ethernet : 10 Gbit/s 1280000000
100 Gigabit Ethernet : 100 Gbit/s 12800000000
WAN modems V.92 modems : 56 kbit/s 7168
ADSL : 8 Mbit/s 1024000
ADSL2 : 12 Mbit/s 1536000
ADSL2+ : 24 Mbit/s 3072000

Note:- Need to use HttpClient 3.1 or HttpClient 4 implementations in jmeter.