Seems there is a Bug in how Taurus modifies Test plan to affect Thread Groups

70 views
Skip to first unread message

Philippe Mouawad

unread,
Feb 7, 2019, 9:11:38 AM2/7/19
to codenam...@googlegroups.com
Hello,

I have a  test plan where Thread Group percentage is configured in YAML:
  • pct_1: 0.3
  • pct_2: 0.7
I configured:
settings:
  env:
     JMETER_VERSION: "5.0"
execution:
- scenario: existing
  hold-for: 3m
  ramp-up: 30s

scenarios:
  existing:
    script: proportions.jmx

modules:
  jmeter:
    #force-ctg: false
    memory-xmx: 5g
    detect-plugins: false
    properties:
      # Repartition
      threads: 100
      pct_1: 0.3
      pct_2: 0.7

So I would expect the modified Test Plan to have:
TG1 set 30 threads
TG2 set 70 threads

But I end up with 1 thread on each TG.
If I set concurrency to 100, I end up with 50 threads each
If I uncomment force-ctg, it is also broken

Questions:
  • Is there a way to do what I want differently ? I am looking to configure percentage of thread groups in YAML
  • Do you confirm it's a bug ?
  • I see in docs:
    • TODO: explain how multi-thread group will accept concurrency with maintained proportion

Thanks

--
Cordialement.
Philippe Mouawad.


proportions.jmx
proportions.yml
modified_proportions.jmx

Philippe Mouawad

unread,
Feb 7, 2019, 10:06:09 AM2/7/19
to codenam...@googlegroups.com
I see in this thread that if we set hard coded numbers in JMeter Taurus will respect proportions:

Is it the only way to do it ?
I don't like it this way as IIUC I am not able to handle repartition from YAML and test plan.

Regards
--
Cordialement.
Philippe Mouawad.


philippe...@gmail.com

unread,
Feb 7, 2019, 10:06:54 AM2/7/19
to codename-taurus
I see in this thread that if we set hard coded numbers in JMeter Taurus will respect proportions:

Is it the only way to do it ?
I don't like it this way as IIUC I am not able to handle repartition from YAML and test plan.

Regards

Andrey Pokhilko

unread,
Feb 7, 2019, 10:29:54 AM2/7/19
to codenam...@googlegroups.com

Hi,

Yes, that's the way.

One of the ways, if you want to repartition, is to:

  • use no "concurrency" in YAML
  • use $__P() function inside JMX, with different property name for each TG
  • use "properties" section to specify property value for each of Thread Groups.

This way, if you still specify "concurrency", Taurus will still respect proportion based on default value parsed out of $__P().

--

Andrey

07.02.2019 18:05, Philippe Mouawad пишет:
--
You received this message because you are subscribed to the Google Groups "codename-taurus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codename-taur...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codename-taurus/CAH9fUpYL35KnQTvt9aDFTNjqUrYZcwuNtJ7%3DwrkXP9Q87qQsiw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Andrey Pokhilko

unread,
Feb 7, 2019, 10:43:04 AM2/7/19
to codenam...@googlegroups.com

When I try to run your files I have a lot of error messages in jmeter.log. Are you sure Jexl function is worth using instead of constant values?

In your example YAML there is no "threads" property set...

When I set it, I get correct behavior.

--

Andrey

07.02.2019 18:06, philippe...@gmail.com пишет:
--
You received this message because you are subscribed to the Google Groups "codename-taurus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codename-taur...@googlegroups.com.

Andrey Pokhilko

unread,
Feb 7, 2019, 10:48:19 AM2/7/19
to Philippe Mouawad, codenam...@googlegroups.com

No, you did it right in your YAML file, except missing "threads". Probably you need default value for "threads" in your Jexl, too.

--

Andrey

07.02.2019 18:43, Philippe Mouawad пишет:


On Thu, Feb 7, 2019 at 4:29 PM 'Andrey Pokhilko' via codename-taurus <codenam...@googlegroups.com> wrote:

Hi,

Yes, that's the way.

One of the ways, if you want to repartition, is to:

  • use no "concurrency" in YAML
  • use $__P() function inside JMX, with different property name for each TG
  • use "properties" section to specify property value for each of Thread Groups.

This way, if you still specify "concurrency", Taurus will still respect proportion based on default value parsed out of $__P().

Thanks Andrey.

I by "use no "concurrency" in YAML" you mean what I attach, I think I tried already this one and it didn't work wether I remove or not force-cth
Did I make a mistake ?

For more options, visit https://groups.google.com/d/optout.


--
Cordialement.
Philippe Mouawad.


Andrey Pokhilko

unread,
Feb 7, 2019, 10:52:29 AM2/7/19
to Philippe Mouawad, codenam...@googlegroups.com

It works perfectly for me. How do you tell that it does not work?

--

Andrey

07.02.2019 18:47, Philippe Mouawad пишет:
First find attached the missing files of my last answer implementing what you propose.
It doesn't work for me.

Let me check on my side the first version


For more options, visit https://groups.google.com/d/optout.


--
Cordialement.
Philippe Mouawad.


Andrey Pokhilko

unread,
Feb 7, 2019, 11:22:39 AM2/7/19
to Philippe Mouawad, codenam...@googlegroups.com

This version works fine for me.

--

Andrey

07.02.2019 18:57, Philippe Mouawad пишет:
Which version works for you ?

With the last files sent,
I have 2 threads (50% / 50%) while I should have 100 threads (30 for TG1/ 70 for TG2)

--
Cordialement.
Philippe Mouawad.


proportions.jmx
proportions.yml

Andrey Pokhilko

unread,
Feb 7, 2019, 11:33:28 AM2/7/19
to Philippe Mouawad, codenam...@googlegroups.com

You are not crazy, you just hit the bug that was fixed in master branch already. I use latest master in my env, so it works fine for me.

You can install latest snapshot to try it, or wait for the next release (1-2 weeks).

--

Andrey

07.02.2019 19:27, Philippe Mouawad пишет:
I must be crazy Andrey , I have this using  Taurus CLI Tool v1.13.2:

17:26:16 WARNING: Parsing concurrency '${__P(pct_1,40)}' in group 'ThreadGroup' failed, choose 1
17:26:16 WARNING: Parsing concurrency '${__P(pct_2,60)}' in group 'ThreadGroup' failed, choose 1
--
Cordialement.
Philippe Mouawad.


Andrey Pokhilko

unread,
Feb 7, 2019, 11:38:38 AM2/7/19
to Philippe Mouawad, codenam...@googlegroups.com

There's no strict date for it, I estimate it as 1-2 weeks from now.

07.02.2019 19:34, Philippe Mouawad пишет:
I prefer that :-)
What's the expected release date for this new version ?

Thanks
--
Cordialement.
Philippe Mouawad.


Andrey Pokhilko

unread,
Feb 7, 2019, 11:50:29 AM2/7/19
to Philippe Mouawad, codenam...@googlegroups.com

When "concurrency" is not set, Taurus will keep using your JEXL functions in corresponding fields.

"force-ctg" is exactly to control the behavior of TG type change, like you describe it.

--

Andrey

07.02.2019 19:43, Philippe Mouawad пишет:
Thanks.

Regarding this field, I have 2 doubts:
  • Will Taurus touch "Number of Threads" property when concurrency is not set (IMO it shouldn't ) , and what is the relation with force-ctg ?
  • If it does, will initial syntax based on JEXL3 work ? It works in plain JMeter
    • ${__jexl3((props.getOrDefault("pct_services"\, "0")*props.get("threads")).intValue(),)}
  • What exactly is the impact of "force-ctg: false", IMU it will not replace Thread Group by Concurrency Thread Group but  is it the only impact ?

Thanks
--
Cordialement.
Philippe Mouawad.


Philippe Mouawad

unread,
Feb 8, 2019, 8:18:26 AM2/8/19
to Andrey Pokhilko, codenam...@googlegroups.com
Which version works for you ?

With the last files sent,
I have 2 threads (50% / 50%) while I should have 100 threads (30 for TG1/ 70 for TG2)


On Thu, Feb 7, 2019 at 4:52 PM Andrey Pokhilko <andrey....@broadcom.com> wrote:


--
Cordialement.
Philippe Mouawad.


Philippe Mouawad

unread,
Feb 8, 2019, 8:18:26 AM2/8/19
to Andrey Pokhilko, codenam...@googlegroups.com
On Thu, Feb 7, 2019 at 4:29 PM 'Andrey Pokhilko' via codename-taurus <codenam...@googlegroups.com> wrote:

Hi,

Yes, that's the way.

One of the ways, if you want to repartition, is to:

  • use no "concurrency" in YAML
  • use $__P() function inside JMX, with different property name for each TG
  • use "properties" section to specify property value for each of Thread Groups.

This way, if you still specify "concurrency", Taurus will still respect proportion based on default value parsed out of $__P().

Thanks Andrey.

I by "use no "concurrency" in YAML" you mean what I attach, I think I tried already this one and it didn't work wether I remove or not force-cth
Did I make a mistake ?

--


For more options, visit https://groups.google.com/d/optout.


--
Cordialement.
Philippe Mouawad.


Philippe Mouawad

unread,
Feb 8, 2019, 8:18:26 AM2/8/19
to Andrey Pokhilko, codenam...@googlegroups.com
I added threads in yaml and it still doesn't work for me.
See  test plan modified by Taurus

So for now, unless I am missing something, the only way to make it work is to hard code proportions as numbers in Thread Groups.
--
Cordialement.
Philippe Mouawad.


proportions.jmx
proportions.yml
modified_proportions.jmx

Philippe Mouawad

unread,
Feb 8, 2019, 8:18:26 AM2/8/19
to Andrey Pokhilko, codenam...@googlegroups.com
First find attached the missing files of my last answer implementing what you propose.
It doesn't work for me.

Let me check on my side the first version


For more options, visit https://groups.google.com/d/optout.


--
Cordialement.
Philippe Mouawad.


proportions.yml
proportions.jmx

Philippe Mouawad

unread,
Feb 8, 2019, 8:18:26 AM2/8/19
to Andrey Pokhilko, codenam...@googlegroups.com
Thanks.

Regarding this field, I have 2 doubts:
  • Will Taurus touch "Number of Threads" property when concurrency is not set (IMO it shouldn't ) , and what is the relation with force-ctg ?
  • If it does, will initial syntax based on JEXL3 work ? It works in plain JMeter
    • ${__jexl3((props.getOrDefault("pct_services"\, "0")*props.get("threads")).intValue(),)}
  • What exactly is the impact of "force-ctg: false", IMU it will not replace Thread Group by Concurrency Thread Group but  is it the only impact ?

Thanks
--
Cordialement.
Philippe Mouawad.


Philippe Mouawad

unread,
Feb 8, 2019, 8:18:26 AM2/8/19
to Andrey Pokhilko, codenam...@googlegroups.com
I prefer that :-)
What's the expected release date for this new version ?

Thanks

--
Cordialement.
Philippe Mouawad.


Philippe Mouawad

unread,
Feb 8, 2019, 8:18:26 AM2/8/19
to Andrey Pokhilko, codenam...@googlegroups.com
I must be crazy Andrey , I have this using  Taurus CLI Tool v1.13.2:

17:26:16 WARNING: Parsing concurrency '${__P(pct_1,40)}' in group 'ThreadGroup' failed, choose 1
17:26:16 WARNING: Parsing concurrency '${__P(pct_2,60)}' in group 'ThreadGroup' failed, choose 1

--
Cordialement.
Philippe Mouawad.


Reply all
Reply to author
Forward
0 new messages