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/04/20 03:48:43 UTC

[Bug 64367] New: UDV defined in test plan failed to be expanded in distributed testing mode

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

            Bug ID: 64367
           Summary: UDV defined in test plan failed to be expanded in
                    distributed testing mode
           Product: JMeter
           Version: 5.2.1
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: flynnhome.liu@gmail.com
  Target Milestone: JMETER_5.3.0

Created attachment 37184
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37184&action=edit
test plan

I defined a UDV in root element of the test plan as follows:
name:  BASE_FILENAME    
value: 
${__TestPlanName}_${__P(NUM_THREAD,0)}threads_${__P(NUM_LOOP,0)}trans_${__P(TPS_MIN,0)}tpm_${__Random(0,10000)}

There is a "Simple Data Writer" listener in the test plan which refer to the
variable as a file name which saved requests and responses, I ran the test with
following commands:
//local mode
jmeter.bat -n -t http_bing.jmx -l http_bing.csv -JNUM_THREAD=2 -JNUM_LOOP=5
-JTPS_MIN=1800 -JTIME_RAMPUP=1 
//distributed mode, -R option follows two IP address of JMeter-server
jmeter.bat -n -t http_bing.jmx -l http_bing.csv -R "172.17.96.4,172.17.119.6"
-GNUM_THREAD=2 -GNUM_LOOP=5 -GTPS_MIN=1800 -GTIME_RAMPUP=1 

I found that the variable failed to be expanded in distributed testing mode and
it produced a result file
"${__TestPlanName}_${__P(NUM_THREAD,0)}threads_${__P(NUM_LOOP,0)}trans_${__P(TPS_MIN,0)}tpm_${__Random(0,10000)}.xml",
but it was expanded successfully in local mode testing and produced a file
http_bing.jmx_2threads_5trans_1800tpm_807.xml

I guess it may a bug in variable expansion.

JMeter version: 2.5.1
Java version: 1.8.0_161
OS version: windows 10
JMX file: see attachment http_bing.jmx

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

[Bug 64367] UDV defined in test plan failed to be expanded in distributed testing mode

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

Owen <fl...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #2 from Owen <fl...@gmail.com> ---
(In reply to Felix Schumacher from comment #1)
> Hi Owen, 
> 
> thanks for the clear description of your problem, however I think this
> question would have been best asked on the users mailing list (see
> https://jmeter.apache.org/mail2.html#JMeterUser for more info).
> 
> Parameters that are global (i.e. seen on on all cluster members) should be
> given with -G instead of -J. That is described in
> https://jmeter.apache.org/usermanual/remote-test.html
> 
> Why did you use -J? Would you like to contribute changes to the
> documentation, that make this clearer?
> 
> Feel free to close this bug, if -G helped to solve your problem.
> 
> PS. Another thing (that you didn't explicitly asked for): the usage of
> __Random should have worked in distributed mode, but you are probably better
> of using a node identifier like the function __machineName.

Hi Felix,

Thanks for your quick reply.

Indeed I used the -J option in local running mode and -G option in distributed
testing mode.

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

[Bug 64367] UDV defined in test plan failed to be expanded in distributed testing mode

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

--- Comment #11 from Owen <fl...@gmail.com> ---
Comment on attachment 37193
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37193
jmeter log files on node1

jmeter-server.log can only be displayed by the command "cat", other text
viewer/editor may fail to open it. I don't know why.

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

[Bug 64367] UDV defined in test plan failed to be expanded in distributed testing mode

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
             Status|NEW                         |NEEDINFO

--- Comment #1 from Felix Schumacher <fe...@internetallee.de> ---
Hi Owen, 

thanks for the clear description of your problem, however I think this question
would have been best asked on the users mailing list (see
https://jmeter.apache.org/mail2.html#JMeterUser for more info).

Parameters that are global (i.e. seen on on all cluster members) should be
given with -G instead of -J. That is described in
https://jmeter.apache.org/usermanual/remote-test.html

Why did you use -J? Would you like to contribute changes to the documentation,
that make this clearer?

Feel free to close this bug, if -G helped to solve your problem.

PS. Another thing (that you didn't explicitly asked for): the usage of __Random
should have worked in distributed mode, but you are probably better of using a
node identifier like the function __machineName.

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

[Bug 64367] UDV defined in test plan failed to be expanded in distributed testing mode

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #7 from Felix Schumacher <fe...@internetallee.de> ---
Thanks for the log file, are there any log files on the remote nodes?

Another thing I noticed in the log file. You seem to have a lot of jar files
placed under /opt/jmeter_dependencies. Where do they come from? Do you really
need them?

There are a lot of ClassNotFoundExceptions in the log which probably are OK,
but I would try to get rid of them by adding the needed dependencies.

Interesting bit is 

08:14:32.066 [RMI TCP Connection(2)-172.17.119.16] DEBUG
org.apache.jmeter.reporters.ResultCollector - Getting file:
${__TestPlanName}_${__P(NUM_THREAD,0)}threads_${__P(NUM_LOOP,0)}trans_${__P(TPS_MIN,0)}tpm_${__Random(0,10000)}.xml
in thread RMI TCP Connection(2)-172.17.119.16
08:14:32.067 [RMI TCP Connection(2)-172.17.119.16] DEBUG
org.apache.jmeter.reporters.ResultCollector - Getting file:
http_bing_3threads_20trans_300tps.5812.csv in thread RMI TCP
Connection(2)-172.17.119.16

The second line seem to have the values replaced. (I haven't looked further
into this, yet)

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

[Bug 64367] UDV defined in test plan failed to be expanded in distributed testing mode

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

--- Comment #8 from Owen <fl...@gmail.com> ---
Jar files under /opt/jmeter_dependencies are JMeter plugins and their
dependencies, they are parts of my testing project, those jar files are built
into the docker image, it should be OK as I ran the same test with the same
docker image in local running mode successfully(UDV can be expanded
successfully).

I think variable expansion was failed, the variable definition is ended with
".xml", instead of ".csv", the ".csv" file is JMeter result file which contains
result of each sample, the name of result file is passed to JMeter process from
command line argument which is constructed by concatenation of shell
variables.(I simplified the command line arguments in the description of this
ticket)

I will attach log files on remote nodes later.

Thanks.

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

[Bug 64367] UDV defined in test plan failed to be expanded in distributed testing mode

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

flynnhome.liu@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |flynnhome.liu@gmail.com
                 OS|                            |Windows 10

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

[Bug 64367] UDV defined in test plan failed to be expanded in distributed testing mode

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #4 from Felix Schumacher <fe...@internetallee.de> ---
Are there any log messages on any of the JMeter nodes?

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

[Bug 64367] UDV defined in test plan failed to be expanded in distributed testing mode

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

Owen <fl...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #12 from Owen <fl...@gmail.com> ---
node1.tar.gz and node2.tar.gz contain the log files on two remote nodes, one of
them also was used to execute the command line for distributed testing.

you can see the variable expansion was failed

08:24:05.690 [main] DEBUG org.apache.jmeter.engine.util.ValueReplacer - About
to replace in property of type: class
org.apache.jmeter.testelement.property.StringProperty: ${BASE_FILENAME}.xml
08:24:05.692 [main] DEBUG
org.apache.jmeter.testelement.property.AbstractProperty - Not running version,
return raw function string
08:24:05.692 [main] DEBUG org.apache.jmeter.engine.util.ValueReplacer -
Replacement result: ${BASE_FILENAME}.xml
08:24:05.692 [main] DEBUG org.apache.jmeter.engine.util.ValueReplacer - About
to replace in property of type: class
org.apache.jmeter.testelement.property.BooleanProperty: false 

PS: the file jmeter-server.log in the tarball can only be displayed by the
command "cat", other text viewer/editor can't display it normally.

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

[Bug 64367] UDV defined in test plan failed to be expanded in distributed testing mode

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

--- Comment #9 from Owen <fl...@gmail.com> ---
Created attachment 37193
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37193&action=edit
jmeter log files on node1

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

[Bug 64367] UDV defined in test plan failed to be expanded in distributed testing mode

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

--- Comment #13 from Felix Schumacher <fe...@internetallee.de> ---
I can reproduce the issue.

The problem seems to be, that the BASE_FILENAME property used in the is Simple
Data Writer is evaluated on the master (not on the controlled client). But the
master is not set to "RUNNING". Therefore the property is not evaluated and we
get the raw string back. The corresponding log line is:

08:24:05.692 [main] DEBUG
org.apache.jmeter.testelement.property.AbstractProperty - Not running version,
return raw function string

I am unsure, what to do about it.

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

[Bug 64367] UDV defined in test plan failed to be expanded in distributed testing mode

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

--- Comment #6 from Owen <fl...@gmail.com> ---
Created attachment 37186
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37186&action=edit
jmeter.log

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

[Bug 64367] UDV defined in test plan failed to be expanded in distributed testing mode

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

--- Comment #3 from Owen <fl...@gmail.com> ---
(In reply to Owen from comment #0)
> Created attachment 37184 [details]
> test plan
> 
> I defined a UDV in root element of the test plan as follows:
> name:  BASE_FILENAME    
> value: 
> ${__TestPlanName}_${__P(NUM_THREAD,0)}threads_${__P(NUM_LOOP,
> 0)}trans_${__P(TPS_MIN,0)}tpm_${__Random(0,10000)}
> 
> There is a "Simple Data Writer" listener in the test plan which refer to the
> variable as a file name which saved requests and responses, I ran the test
> with following commands:
> //local mode
> jmeter.bat -n -t http_bing.jmx -l http_bing.csv -JNUM_THREAD=2 -JNUM_LOOP=5
> -JTPS_MIN=1800 -JTIME_RAMPUP=1 
> //distributed mode, -R option follows two IP address of JMeter-server
> jmeter.bat -n -t http_bing.jmx -l http_bing.csv -R
> "172.17.96.4,172.17.119.6" -GNUM_THREAD=2 -GNUM_LOOP=5 -GTPS_MIN=1800
> -GTIME_RAMPUP=1 
> 
> I found that the variable failed to be expanded in distributed testing mode
> and it produced a result file
> "${__TestPlanName}_${__P(NUM_THREAD,0)}threads_${__P(NUM_LOOP,
> 0)}trans_${__P(TPS_MIN,0)}tpm_${__Random(0,10000)}.xml", but it was expanded
> successfully in local mode testing and produced a file
> http_bing.jmx_2threads_5trans_1800tpm_807.xml
> 
> I guess it may a bug in variable expansion.
> 
> JMeter version: 2.5.1
> Java version: 1.8.0_161
> OS version: windows 10
> JMX file: see attachment http_bing.jmx

JMeter version should be 5.2.1

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

[Bug 64367] UDV defined in test plan failed to be expanded in distributed testing mode

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

--- Comment #10 from Owen <fl...@gmail.com> ---
Created attachment 37194
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37194&action=edit
jmeter log files on node2

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

[Bug 64367] UDV defined in test plan failed to be expanded in distributed testing mode

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

Owen <fl...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #5 from Owen <fl...@gmail.com> ---
(In reply to Felix Schumacher from comment #4)
> Are there any log messages on any of the JMeter nodes?

I ran the test with DEBUG log level and checked JMeter logs, no valuable info
was found. you can search the file with the command "grep NUM_THREAD
jmeter.log".

I ran the distributed testing on two containers in K8S with Debian 10 and
openjdk version "11.0.6".

please refer to the attachment jmeter.log

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