Bug 42012

Summary: Variable Listener filenames do not get processed in remote tests
Product: JMeter - Now in Github Reporter: Oliver Erlewein <olivere>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: enhancement CC: ksummerlin, p.mouawad
Priority: P3    
Version: 2.2   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Oliver Erlewein 2007-04-01 00:04:03 UTC
I have a distributed load site with Windows XP PC's running JMeter 2.2. I've written my script to save data 
to a file (Simple Listener) ./XYZ_${__time(YMDHMS)}.jtl . Now if I run the script locally all's fine and the date 
gets written. If I use the same script on a remote machine (via RMI) the variable doesn't resolve and the 
filename is literally ./XYZ_${__time(YMDHMS)}.jtl. Now with times that might be a bit difficult as that 
changes but even static variables do not get translated.
Comment 1 Sebb 2007-04-01 07:23:15 UTC
I've had a look at this, and it seems that the problem is that the filename is 
being retrieved as a StringProperty, rather than a FunctionProperty, so the 
functions are not being resolved.

The test plan is processed OK for function calls that are resolved on the 
server (e.g. using __time() in test element name works OK), however the 
Listeners are actually run on the client by RMI calls from the server.

It seems that the local (client) part of the test plan is not being processed 
to resolve function references - however I have not yet found out where this 
needs to be done.
Comment 2 Sebb 2007-10-25 13:36:08 UTC
Finally found out how to fix this; applied to SVN in r588342
Comment 3 Sebb 2007-11-07 10:50:57 UTC
There was a problem with the fix - it was incomplete.
Now fixed in SVN r592849.

However, it's still not possible to use plain variables in remote test file 
names.
Comment 4 Dustin 2010-11-02 13:14:46 UTC
(In reply to comment #3)
> There was a problem with the fix - it was incomplete.
> Now fixed in SVN r592849.
> 
> However, it's still not possible to use plain variables in remote test file 
> names.

Has no work been done on this recently?  I just ran into this error today while doing load tests.
Comment 5 Sebb 2010-11-02 13:30:41 UTC
As far as I recall, this would be very tricky to resolve, as the variables are defined on the server, but the files are opened by the client.
Comment 6 Dustin 2010-11-02 14:14:59 UTC
(In reply to comment #5)
> As far as I recall, this would be very tricky to resolve, as the variables are
> defined on the server, but the files are opened by the client.

I'm assuming in reference to my situation where I'm running the test from the GUI you mean the GUI as the client?  Just checking to make sure I'm understanding you correctly

Also, are there workarounds for this then?
Comment 7 Sebb 2010-11-02 16:10:23 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > As far as I recall, this would be very tricky to resolve, as the variables are
> > defined on the server, but the files are opened by the client.
> 
> I'm assuming in reference to my situation where I'm running the test from the
> GUI you mean the GUI as the client?  Just checking to make sure I'm
> understanding you correctly

Yes, in client-server mode the client is the node that starts the tests on the servers.

> Also, are there workarounds for this then?

Don't use variables; use properties or functions instead.
Comment 8 Philippe Mouawad 2011-11-11 14:14:30 UTC
*** Bug 46779 has been marked as a duplicate of this bug. ***
Comment 9 Philippe Mouawad 2011-12-01 21:55:00 UTC
Make it an enhancement but maybe it should be closed as won't fix.
Comment 10 Philippe Mouawad 2016-02-26 21:31:56 UTC
Currently possible using Properties not variables.
Should be enough.
Comment 11 The ASF infrastructure team 2022-09-24 20:37:39 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1901