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 2015/07/15 07:41:21 UTC

[Bug 58140] New: Fail to handling input with random values as parameters in java request

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

            Bug ID: 58140
           Summary: Fail to handling input with random values as
                    parameters in java request
           Product: JMeter
           Version: 2.11
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: sjc2547@163.com

Created attachment 32905
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=32905&action=edit
code example

1. Create a Java request Jar, code please see the attached.
2. Launch JMeter and add this Java request sample
3. Add a Random Variable (right click Thread Group, add=>Config Element=>Random
Variable), set variable Name="random"
4. in the Java request, set the value of the para =${random}
5. save jmx file
6. Execute it, you will see in the cmd we get the correct output.
7. However, if we change the loop Count to set it as >1 number, for example,
set it as 5. still keep Number of Threads(users)=1
Expect result:
we should get different values in the cmd.
for example:
23
54
32
18
4
Actual result:
every time I get same value. for example:
34
34
34
34
34

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

[Bug 58140] Fail to handle inputing with random values as parameters in java request

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

sjc2547 <sj...@163.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|2.11                        |2.13

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

[Bug 58140] Fail to handle inputing with random values as parameters in java request

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

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

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

--- Comment #1 from Felix Schumacher <fe...@internetallee.de> ---
You are using the api of JavaSamplerClient in a wrong way.
JavaSamplerClient#setupTest(JavaSamplerContext) is called at the test plan
start.

You have to get the current variables from the JavaSamplerContext parameter of
the runTest method.

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

[Bug 58140] Fail to handle inputing with random values as parameters in java request

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

sjc2547 <sj...@163.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Fail to handling input with |Fail to handle inputing
                   |random values as parameters |with random values as
                   |in java request             |parameters in java request
                 OS|                            |All

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