đź““
Loadium Wiki
  • Welcome to Loadium
  • Getting Started with Loadium
  • Quick Guides
    • Quick Start
    • JMeter Test
    • Locust Test
    • Script Builder
      • Simple HTTP Builder
      • Record&Play
    • Gatling Test
    • WebDriver Test
    • HLS Test
    • Understanding Test Reports
    • Test Execution Fail Reasons
    • File Output
  • ABOUT LOADIUM
    • Features
    • Pricing
    • VUH - Virtual User Hour
  • ACCOUNT
    • Profile & Account
    • Subscription
  • Features
    • Test Report
    • Compare Test
    • Private Location
    • Report PDF Export
  • Test Settings
    • Split CSV
    • Sandbox
    • Multi-Step
    • Geolocation
    • Customize Setup
    • Dedicated IP
    • Send Email
    • DNS Override
    • TPS
    • Network Type
    • Test Scheduling
    • Test Failure Settings
    • JMeter Settings
    • Failure Criteria
    • Flexible Thread Scheduling
  • CONTINUOUS INTEGRATION SUPPORT
    • Azure DevOps Pipeline
    • Jenkins Load Testing with Loadium
  • Integrations
    • Microsoft Teams Integration
    • New Relic Integration
    • AppDynamics Integration
    • TeamCity Integration
  • Jmeter Corner
    • Built-in JMeter Functions
    • How to Install JMeter Plugins
    • Record and Play Load Testing With Jmeter in 5 Steps
    • Websocket with Apache JMeter
    • JMeter Timers
    • Handling Error Messages of JMeter Tests in Loadium
    • Details of Throughput Controller in JMeter (Splitting Threads to Different Requests)
    • How to Add a Varying Number of Parameters in Apache JMeter
    • Local Network Simulation On JMeter
    • Running Load Test with FTP Server
  • Gatling Corner
    • Introduction to Gatling
    • Gatling Recorder
    • Gatling Pros&Cons
  • PUBLIC APIs
    • Get Test Status Service
    • Authentication Service
    • Get Performance Test List Service
    • Start Performance Test Service
Powered by GitBook
On this page

Was this helpful?

  1. Jmeter Corner

Local Network Simulation On JMeter

PreviousHow to Add a Varying Number of Parameters in Apache JMeterNextRunning Load Test with FTP Server

Last updated 3 years ago

Was this helpful?

For the recent years, mobile had overtaken desktop traffic. It seems that this trend will continue to rise. But does it change in our lives? That means that our users are on the move. They are not sitting in their comfortable chairs and take benefit of great DSL network speeds.

In most cases, mobile device users access the internet via their cellular operator network. The speed, reliability varies depending on the location of the user. You’ll realize that it’s always changing. That means speed varies mostly during the day. So we need to make sure that websites or mobile application work on every condition without affecting the user experience with functional and non-functional aspects in different internet connection speeds.

How to Simulate Different Network Speeds?

By default, sends all requests defined in a Test Plan as fast as it could, depending on the local computer that you are working on. This is incredibly important for producing the load effectively but from a user side, it is not very realistic. As real users don’t send requests to the server without taking a breath, they also spend some time to think between any operations. Besides that, mobile users have limited network bandwidth and that limits them to make requests at the slower speed. So mobile scripts should mimic the network type.

In your jmeter.properties file, there are two properties that define the bandwidth type that you use during your . Those properties are httpclient.socket.http.cps=0 httpclient.socket.https.cps=0 One is for HTTP, the other one is for HTTPS requests. CPS stands for “Character per second”. When all those values are set to zero, it means there is no limit. No limit means no waiting. When those values are set to some other value, it means that the bandwidth throttle according to the value that you specified.

CPS Calculation Formula is:

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

For example: to emulate the Mobile EDGE cellular network speed (which is 384 Kbits/second downstream), the relevant CPS value would be: 49152 (384 * 1024 / 8)

Then go to your jmeter.properties file and set the cps values. httpclient.socket.http.cps=21888 httpclient.socket.https.cps=21888 In case you don’t want to mess up with all those setting files, you can use the command line to manipulate those values on runtime. Below is the command for it. jmeter -Jhttpclient.socket.http.cps=21888 -Jhttpclient.socket.https.cps=21888 -t /performancescript.jmx Here are some popular bandwidth presets:

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

allows you to manipulate those values before the test run.

Happy testing!

You can set different bandwidth type for all the engines. So you can create a realistic load with the different type of bandwidth usage. Don’t forget that this kind of configurations are very useful when it comes to Black Friday, Cyber Monday scenarios.

If you don't see the answer to your question here, please to let us know! We're always improving our documentation.

JMeter
performance testing
performance tests
Loadium
testing
Getting Started with Loadium
JMeter Test
Pricing
reach out to us