You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jakarta.apache.org by bu...@apache.org on 2010/05/31 14:55:15 UTC
DO NOT REPLY [Bug 49365] New: Allow result set to be written to file
in a path relative to the loaded script
https://issues.apache.org/bugzilla/show_bug.cgi?id=49365
Summary: Allow result set to be written to file in a path
relative to the loaded script
Product: JMeter
Version: Nightly (Please specify date)
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P2
Component: Main
AssignedTo: notifications@jakarta.apache.org
ReportedBy: moreira@privasphere.com
Created an attachment (id=25502)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25502)
Relative paths for results file
In the View Results tree GUI component we can enter a filename for the results
of our script. Unfortunately if we enter a relative path, this is interpreted
as relative to the jmeter/bin folder.
A more intuitive approach would load it relative to the same folder as the
script that we are running.
I have attached a patch for this RFE. See also: bug43389
Regards
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 49365] Allow result set to be written to file in a
path relative to the loaded script
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49365
--- Comment #10 from Sebb <se...@apache.org> 2010-08-26 06:28:44 EDT ---
ResultCollector is probably OK, as most files written by JMeter will be created
by that class. Can't think of any other files created by JMeter (apart from
jmeter.log, which is opened before the JMX file location is known).
I hope to take a look at including the patch next week.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 49365] Allow result set to be written to file in a
path relative to the loaded script
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49365
--- Comment #11 from Luciana Moreira <mo...@privasphere.com> 2010-10-22 08:49:33 EDT ---
Any reason for not including this one? I may have a bit of time next week to
work on it if anything else is missing.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 49365] Allow result set to be written to file in a
path relative to the loaded script
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49365
--- Comment #4 from Luciana Moreira <mo...@privasphere.com> 2010-06-02 10:25:33 EDT ---
Hello Sebb and thx for the reply :)
Yes I agree with you that currently the path is relative to the launch
directory and not necessarily jmeter/bin. But as I mentioned in bug43389 if I
am working on different scripts I have to start JMeter every time I change
scripts to change the launch directory.
When using source control systems, files are organized in a structured way
relative to the scripts rather than the jmeter launch directory. This is why I
still believe that paths should be relative to the scripts.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 49365] Allow result set to be written to file in a
path relative to the loaded script
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49365
--- Comment #7 from Sebb <se...@apache.org> 2010-08-25 17:21:11 EDT ---
Have a look at JMeterUtils
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 49365] Allow result set to be written to file in a
path relative to the loaded script
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49365
--- Comment #12 from Sebb <se...@apache.org> 2010-10-22 09:52:58 EDT ---
I now think the simplest might be to support a file name prefix that means
"relative to the JMX file", for example "!/" or perhaps "~/".
So "!/output.jtl" would be relative to the JMX location.
Just in case someone needs to create a file in a directory with the name "~" or
"!", the prefix could be overriden at startup using a JMeter property.
One way to do this would be to add a file name normalisation method to
FileServer, which one would need to call anyway to get the base location.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 49365] Allow result set to be written to file in a
path relative to the loaded script
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49365
--- Comment #9 from Luciana Moreira <mo...@privasphere.com> 2010-08-26 03:39:09 EDT ---
Thx for the tip Sebb.
I have set the property name (PATH_RELATIVE_TO) in the ResultCollector class,
but I believe this can probably be used in other classes. Maybe it is better if
it is placed elsewhere. Additionally it looks to me like the name I used for
the property may not follow the jmeter name conventions. Maybe something like
jmeter.path.relative.to is more convenient? I leave this up to you to decide.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 49365] Allow result set to be written to file in a
path relative to the loaded script
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49365
Sebb <se...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #13 from Sebb <se...@apache.org> 2010-10-28 18:02:41 EDT ---
URL: http://svn.apache.org/viewvc?rev=1028515&view=rev
Log:
Bug 49365 - Allow result set to be written to file in a path relative to the
loaded script
Modified:
jakarta/jmeter/trunk/bin/examples/CSVSample.jmx
jakarta/jmeter/trunk/bin/jmeter.properties
jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java
jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultSaver.java
jakarta/jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java
jakarta/jmeter/trunk/xdocs/changes.xml
jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml
jakarta/jmeter/trunk/xdocs/usermanual/listeners.xml
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 49365] Allow result set to be written to file in a
path relative to the loaded script
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49365
--- Comment #5 from Sebb <se...@apache.org> 2010-06-02 11:54:18 EDT ---
The patch changes the behaviour of JMeter in an incompatible way, so cannot be
applied as it stands.
There needs to be some way for the user to select whether the filename is
relative to the launch directory or to the script file. One way to do this
would be to make the new behaviour dependent on a property, which defaults to
false.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 49365] Allow result set to be written to file in a
path relative to the loaded script
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49365
--- Comment #2 from Luciana Moreira <mo...@privasphere.com> 2010-05-31 10:00:44 EDT ---
Created an attachment (id=25503)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25503)
Added a minor correction to the log output
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 49365] Allow result set to be written to file in a
path relative to the loaded script
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49365
--- Comment #1 from Luciana Moreira <mo...@privasphere.com> 2010-05-31 09:06:24 EDT ---
The version of JMeter I used was taken from SVN revision: 946591
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 49365] Allow result set to be written to file in a
path relative to the loaded script
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49365
--- Comment #3 from Sebb <se...@apache.org> 2010-06-01 11:47:19 EDT ---
(In reply to comment #0)
> In the View Results tree GUI component we can enter a filename for the results
> of our script. Unfortunately if we enter a relative path, this is interpreted
> as relative to the jmeter/bin folder.
Actually it is relative to the JMeter launch directory.
This defaults to the jmeter/bin directory, but can be anywhere else.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 49365] Allow result set to be written to file in a
path relative to the loaded script
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49365
--- Comment #6 from Luciana Moreira <mo...@privasphere.com> 2010-08-25 05:51:33 EDT ---
This idea sounds good. Is there a class in jmeter that deals with jmeter
properties specifically, or can I use standard java code such as:
Properties props = new Properties();
props.load(new FileInputStream("jmeter.properties"));
relativePath = props.getProperty("relative.path");
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 49365] Allow result set to be written to file in a
path relative to the loaded script
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49365
--- Comment #8 from Luciana Moreira <mo...@privasphere.com> 2010-08-26 03:34:50 EDT ---
Created an attachment (id=25947)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25947)
New patch using a jmeter property
This patch allows result files to be loaded and written with a path relative to
the script or launch directory. The behavior is controlled by a property set in
the jmeter.properties.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org