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 2017/07/19 15:57:59 UTC

[Bug 61318] New: Random Variable element does not evaluate variables

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

            Bug ID: 61318
           Summary: Random Variable element does not evaluate variables
           Product: JMeter
           Version: 3.2
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: major
          Priority: P2
         Component: HTTP
          Assignee: issues@jmeter.apache.org
          Reporter: amar.darisa@gmail.com
  Target Milestone: ---

Created attachment 35152
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35152&action=edit
screenshots

When I use my variable created in JSON Extractor I cannot use it in Random
Variable as Maximum Value. The variables value is not getting evaluated inside
Maximum Value field when used.

I have a variable totalIncentives which is created in JSON Extractor

Then I want it use as Maximum Value in Random Variable

Unfortunately i always get 0 as random value.

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

[Bug 61318] Random Variable element does not evaluate variables

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

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Felix Schumacher <fe...@internetallee.de> ---
Thanks for the report. Could you see in the next nightly, if the added note to
the documentation is enough?

Date: Thu Jul 20 18:43:51 2017
New Revision: 1802524

URL: http://svn.apache.org/viewvc?rev=1802524&view=rev
Log:
Add a note about the usage of variables in 'Random Variable'. Bugzilla Id:
61318

Modified:
    jmeter/trunk/xdocs/usermanual/component_reference.xml

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

[Bug 61318] Random Variable element does not evaluate variables

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

--- Comment #3 from Felix Schumacher <fe...@internetallee.de> ---
Bugzilla is not a support forum. The users mailing list is the correct place to
ask such questions (the latter one). You might want to look at
http://jmeter.apache.org/usermanual/functions.html#__Random

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

[Bug 61318] Random Variable element does not evaluate variables

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

--- Comment #2 from Amar <am...@gmail.com> ---
Hi Felix,

Is there any other alternative way of getting a random value between 0 and
${totalIncentives} value ? As i need this functionality, i am wondering if
there is any other way of getting this logic working so that i am unblocked
with my script. Thanks for your help !

- Amar

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

[Bug 61318] Random Variable element does not evaluate variables

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

--- Comment #1 from Felix Schumacher <fe...@internetallee.de> ---
Your observation is correct. The input is evaluated on test plan start time.
Therefore your extracted values are not available and will be evaluated as "0".

The random value config is called on each iteration (start of each iteration),
but it will not re-evaluate the input at those times. Even if it would, the
first iteration would always be "0".

I am not sure, if this is a bug or works as designed. But this behaviour should
probably be mentioned in the documentation.

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