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/03/19 18:37:50 UTC

[Bug 64245] New: Random(

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

            Bug ID: 64245
           Summary: Random(
           Product: JMeter
           Version: 5.2.1
          Hardware: Macintosh
            Status: NEW
          Severity: major
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: dmurvihill@gmail.com
  Target Milestone: JMETER_5.3.0

Created attachment 37108
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37108&action=edit
Minimal reproduction project

(Actually OS 10.15 but the dropdown is out of date)

The attached test plan generates two samples using __Random(), one second
apart. According to the console, the same number is generated both times, but
two different numbers appear in the results tree.

My test suite's behavior indicates that the number on the console is correct
and the number in the results tree is not.

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

[Bug 64245] Results tree shows incorrect values for __Random() invocations

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

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

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

--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
There is no bug here.

You are using a function inside a JSR223 Sampler where you have checked "Cache
compiled script if available".
As a consequence script is compiled on first run with result of evaluating
${__Random(1000000000,9999999999)}. 
Then you always get same Value during run.

In View Results Tree, you see a different result because script is evaluated.

But if you add return val to your script you'll see it's always the same value
returned.

To fix your script, put the function call in Parameters and then use value in
script as Parameters variable.

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

[Bug 64245] Results tree shows incorrect values for __Random() invocations

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

Dolan Murvihill <dm...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
            Summary|Random(                     |Results tree shows
                   |                            |incorrect values for
                   |                            |__Random() invocations

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

[Bug 64245] Results tree shows incorrect values for __Random() invocations

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

--- Comment #2 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
This is an automated email from the ASF dual-hosted git repository.

pmouawad pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new 225eaf6  Clarify documentation related to Bug report 64245
225eaf6 is described below

commit 225eaf6d49bea86cf45571aa38630a6b0703a2fe
Author: pmouawad <p....@ubik-ingenierie.com>
AuthorDate: Mon Apr 27 13:46:49 2020 +0200

    Clarify documentation related to Bug report 64245
---
 xdocs/usermanual/component_reference.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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