1

I have 3 Thread Groups in my test plan. These Thread Groups must be with fixed request weights (for example 1st-50%, 2nd-40%, 3rd-10%). If I need to emulate constant number of users, the solution in this post which was given by @PMD UBIK-INGENIERIE works good if I set Loop Count as number (1, 10, 100 ect.). But the problem is when I set the check-box "forever" for Loop Counts, the proportion between groups is broken.

Now I need to increase the amount of users, saving proportion of requests between my 3 groups, to perform the capasity assessment. All 3 groups must send requests evenly, in this constant proportion 50-40-10.

If I use Stepping Thread Group, I can evenly increase number of users in each of them, but I can't set the proportion of request for them.

Could you please tell me any idea, how to do this?


UPD1.

My screenshots with settings: enter image description here

and

enter image description here

What is wrong?


UPD2. The last variant (I have put numbers manually for each group) is (Thread Group1 - 50%):

enter image description here

Nadezhda T
  • 262
  • 8
  • 24

1 Answers1

1

The idea is the same as in PMD UBIK-INGENIERI's answer.

  1. Set USERS variable in User Defined Variables or test plan variables (or you can pass it through command line).
    Also set variables:

    PERCENT1 to 0.5
    PERCENT2 to 0.4
    PERCENT3 to 0.1
    
  2. Add 3 stepping thread groups with:

"This group will start" set to

${__BeanShell(Math.round(${PERCENT1}*${USERS})}
${__BeanShell(Math.round(${PERCENT2}*${USERS})}
${__BeanShell(Math.round(${PERCENT3}*${USERS})}

"Then start" set to:

${__BeanShell(Math.round(${PERCENT1}*${USERS}/10)}
${__BeanShell(Math.round(${PERCENT2}*${USERS}/10)}
${__BeanShell(Math.round(${PERCENT3}*${USERS}/10)}

It will work if value of USERS variable can be divided by 100

Community
  • 1
  • 1
Andrei Botalov
  • 20,686
  • 11
  • 89
  • 123
  • Thanks! I add ")" in your strings '${__BeanShell(${PERCENT1}*${USERS})}' and then put these settings in test plan. But no requests were sent. (( I have added 2 screenshots. What is wrong? – Nadezhda T Dec 26 '12 at 13:20
  • Which numbers have you set? – Andrei Botalov Dec 26 '12 at 15:35
  • The last variant was: for "This group will start" I have set: 1st-501, 2nd-401, 3rd-101. (The last group doesn't start as the graph shows). For "Then start" I have set: 1st- 1 per 10s, 2nd- 2 per 25s, 3rd- 1 per 50s. Inside each group I have cycles of several types of subrequests with constant proportion. But I haven't reached the saturation point. )) – Nadezhda T Dec 26 '12 at 21:09
  • @NadezhdaTurovskaya I haven't tried code before running it(( Thread number should be an int, not float – Andrei Botalov Dec 26 '12 at 21:59
  • What do you mean by "saturation point" - "точка насыщения"? What is it? – Andrei Botalov Dec 26 '12 at 22:02
  • 1 question: Yes, it is obvious )). 2 question: As I know from A.Barantcev video, I need the amount of requests, when server will start to perform requests incorrectly and the errors message such type will appear. Sorry for my English. – Nadezhda T Dec 27 '12 at 09:52
  • I don't know why you haven't reached saturation point with 500 threads. Maybe, your server is good enough. Maybe, reason is another. It looks like another issue so try to ask separate question with screenshots of Response Latencies Over Time, Active Threads Over Time from [jmeter-plugins](http://code.google.com/p/jmeter-plugins/) and point if errors appeared during load test. – Andrei Botalov Dec 27 '12 at 10:34
  • Yes, the server seems to be insubmersibled. I have started new branch: http://stackoverflow.com/questions/14073497/error-connection-reset-in-jmeter-soap-xml-web-service. – Nadezhda T Dec 28 '12 at 18:03