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 2016/08/09 18:23:46 UTC

[Bug 59963] New: New Function __RandomFromMultipleVars: Ability to compute a random value from values of 1 or more variables

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

            Bug ID: 59963
           Summary: New Function __RandomFromMultipleVars: Ability to
                    compute a random value from values of 1 or more
                    variables
           Product: JMeter
           Version: 3.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: support@ubikloadpack.com

Created attachment 34119
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34119&action=edit
Patch that implements function

In our campaigns and during our exchanges with our customer we frequently face
the need to extract a random value from values of variables extracted by the
core JMeter extractors Regex, CSS/JQuery, JSON Path, XPath Extractor.
Knowing that those extractors can create 1 to N+1 variables depending on number
of matches (one suffixed with _matchNr, and the ones suffixed with _n where n
is between 1 and n when you select Match to be equal to 1).


When we need to use one value from those ones, we always have to code this in a
custom JSR223 code using Groovy for example.
This code is not easy for beginners and error prone, and for other users it
makes code less readable.

To overcome this limitation, we have coded a new function that does that.

Find the patch attached that we donate to Apache JMeter knowing we have signed
a CCLA.

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

[Bug 59963] New Function __RandomFromMultipleVars: Ability to compute a random value from values of 1 or more variables

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

--- Comment #3 from UbikLoadPack support <su...@ubikloadpack.com> ---
Author: pmouawad
Date: Wed Aug 10 15:13:36 2016
New Revision: 1755766

URL: http://svn.apache.org/viewvc?rev=1755766&view=rev
Log:
Bug 59963 - New Function __RandomFromMultipleVars: Ability to compute a random
value from values of 1 or more variables
Handle matchNr == 0 (JSON Path Extractor)
reuse value
Bugzilla Id: 59963

Modified:
   
jmeter/trunk/src/functions/org/apache/jmeter/functions/RandomFromMultipleVars.java

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

[Bug 59963] New Function __RandomFromMultipleVars: Ability to compute a random value from values of 1 or more variables

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Date: Tue Aug  9 18:31:12 2016
New Revision: 1755638

URL: http://svn.apache.org/viewvc?rev=1755638&view=rev
Log:
Bug 59963 - New Function __RandomFromMultipleVars: Ability to compute a random
value from values of 1 or more variables
Bugzilla Id: 59963

Added:
   
jmeter/trunk/src/functions/org/apache/jmeter/functions/RandomFromMultipleVars.java
  (with props)
Modified:
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
    jmeter/trunk/xdocs/changes.xml
    jmeter/trunk/xdocs/usermanual/functions.xml

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

[Bug 59963] New Function __RandomFromMultipleVars: Ability to compute a random value from values of 1 or more variables

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

--- Comment #2 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Thanks for contribution

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