You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2020/08/19 18:57:21 UTC

[Bug 64679] New: Backend Listener doesn't accept parameterized variables ${}

https://bz.apache.org/bugzilla/show_bug.cgi?id=64679

            Bug ID: 64679
           Summary: Backend Listener doesn't accept parameterized
                    variables ${}
           Product: JMeter
           Version: 5.3
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: mark.bonassera@gmail.com
  Target Milestone: JMETER_5.3.1

Current Behavior:
While using jmeter scripts as a test framework, we pass in our test parameters
at run time so a single JMX can be used to test multiple services.  As part of
this, we pass in the product we are testing, what InfluxDB database to use for
the data, etc.  The backend listener does not replace ${} values in the fields.
 The backend listener needs to currently be "hardcoded" to specific values to
function.

Expected Behavior:
The Backend Listener should be able to process ${} parameter substitution like
other samplers and listeners can.  This would give the ability to use single
JMX tests as a framework, and dynamically set the backend listener values
during the run.

Please let me know if more details are needed.
Best regards,
Mark

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64679] Backend Listener doesn't accept parameterized variables ${}

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64679

--- Comment #2 from slashzero <ma...@gmail.com> ---
Hello,

We are passing the params in via the command line, and re-map them as user
defined variables. So at startup ${__P(propName)} is also stored in
${PROPNAME}.

I will try to use __P directly in the backend listener to see if that makes a
difference, then post an update.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64679] Backend Listener doesn't accept parameterized variables ${}

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64679

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WORKSFORME
             Status|NEEDINFO                    |RESOLVED

--- Comment #7 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Closing as no feedback and it does not seem to be a bug.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64679] Backend Listener doesn't accept parameterized variables ${}

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64679

--- Comment #5 from Anthony Gauthier <an...@gmail.com> ---
If this could be of any help; the way we deal with variables on my team is we
created a notion of "profiles". Profiles to us are simply .csv files that
contain recurring variables that may change depending on the environment we're
using. 

We load said profile on runtime through the "jp@gc Variables from CSV File"
plugin. 

We are then able to dynamically choose what environment we want to test
against. Plus, it's also just much simpler to change a line in a config file
rather than go into the Backend Listener element all the time.

View screenshots for more info:

https://user-images.githubusercontent.com/6709533/92019295-635f0a80-ed24-11ea-927f-03bd199b3d69.png

https://user-images.githubusercontent.com/6709533/92019296-63f7a100-ed24-11ea-91a7-ffbf16d6cabd.png

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64679] Backend Listener doesn't accept parameterized variables ${}

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64679

--- Comment #3 from Anthony Gauthier <an...@gmail.com> ---
Created attachment 37419
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37419&action=edit
Example of a profile CSV file

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64679] Backend Listener doesn't accept parameterized variables ${}

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64679

slashzero <ma...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark.bonassera@gmail.com
                 OS|                            |All

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64679] Backend Listener doesn't accept parameterized variables ${}

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64679

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om
   Target Milestone|JMETER_5.3.1                |---
             Status|NEW                         |NEEDINFO

--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Did you try using:

${__P(propName)}

and pass property using -JpropName=env1

This should work

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64679] Backend Listener doesn't accept parameterized variables ${}

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64679

--- Comment #6 from Felix Schumacher <fe...@internetallee.de> ---
The 'csv' file doesn't look like a Char Separated Value file. It seems to be a
properties file, so I would use an ending of .properties for it. You can use
those files together with the -q argument to make all values inside available
as JMeter properties.

It doesn't support the notion of different sets that could be chosen at
runtime. Those could be emulated by a more complex setup in the ${__P(...)}
syntax, as JMeter will replace the bits recursively. But that will have its
limits and I haven't tried it.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64679] Backend Listener doesn't accept parameterized variables ${}

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64679

Anthony Gauthier <an...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #37419|0                           |1
        is obsolete|                            |

--- Comment #4 from Anthony Gauthier <an...@gmail.com> ---
Comment on attachment 37419
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37419
Example of a profile CSV file

Mistake, can't figure out how to remove attachment.

-- 
You are receiving this mail because:
You are the assignee for the bug.