4

I have 10 concurrent users, and for 2 concurrent users, I need to assign x bandwidth, for 6 users I need to assign y bandwidth and for remaining 2 I need to assign z bandwidth.

How do I achieve the above scenario?

Can I achieve this by using stepping thread group and how?

if we cannot achieve this by using stepping thread group how will I achieve this?

Adnan
  • 2,931
  • 3
  • 23
  • 35
zzz
  • 497
  • 3
  • 14
  • 32

1 Answers1

4

You can't achieve this by using Stepping TG. JMeter lets you simulate network bandwidth very easily but it is not possible in Thread level.

JMeter does give you the option to throttle outgoing bandwidth in order to simulate different network speeds. The bandwidth can be controlled through these two properties:

httpclient.socket.http.cps=0
httpclient.socket.https.cps=0

These are for the HTTP and HTTPS protocols respectively.

Configuration prerequisite:

  • Ensure you use HttpClient 3.1 or HttpClient 4 implementations.

  • Configure bandwidth by defining the 2 properties above in <jmeter home>/bin/user.properties.

You will find these properties in <jmeter home>/bin/jmeter.properties location.

The acronym “cps” stands for "characters per second".

cps values are calculated with this formula :

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

For some popular bandwidth presets and more detail you will find these two blogs Controlling Bandwidth in JMeter and How to Simulate Different Network Speeds in Your JMeter Load Test really helpful.

If you run your test in the distributed mode you can set a different bandwidth for each remote engine by specifying your desired “cps” value in the user.properties file.

Adnan
  • 2,931
  • 3
  • 23
  • 35
  • :Thanks for the information Adnan ..it is really helpful but ..my question is how do i assign different user on different bandwidth ... for e.g. i have to run a test for 30 users of which 10 users will be on LAN, 10 users will be on GPRS, 10 users will be on 3g... how do i achieve this...the above solution looks like running all 30 users on either LAN or GPRS or 3G. – zzz Jul 07 '16 at 09:04
  • Using distributed mode.Install JMeter instances in 4 machines.Configure them as Master (1) and Slaves (3). Configure the 3 slaves as 3 different load generator for three different bandwidths. – Adnan Jul 07 '16 at 14:43
  • Results which are going to be collected on master (Controller )machine ...are they going to display me the results separately for 3 slaves ?? or they will be mixed ..i.e i will be unable to identify the responses of the slaves according to their configuration. – zzz Jul 11 '16 at 09:17