Error loading result file with ~/ prefix in Windows 10

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Error loading result file with ~/ prefix in Windows 10

_elgato
Hi everyone,

After running in some problems trying to load a file in the View
Result Tree window I realized that JMeter will throw an error if we
press Enter in the Write results to file / Read from file field while
the filename contains the relative path default prefix (~/), the same
problem will not appear if the filename does not contain the prefix
and the file will load correctly after pressing Enter.

Here is a simple repo test plan:
https://gist.github.com/elgatov/a2d8736e1c083095278eca846c09671e

1. Download the file to any folder.
2. Run jmeter from the same folder to set the user.dir to that folder
3. Run the test plan
4. Go to "Relative path with prefix", click in the Write results to
file / Read from file field and press Enter. A new window will popup
with message "Error loading results file - could not open file"
5. Go to "Relative path without prefix", click in the Write results to
file / Read from file field and press Enter. The file loads correctly.

Why does this happen?

Thank you.
Regards.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Error loading result file with ~/ prefix in Windows 10

glinius@live.com
*~* symbol is a normal file or folder name in Windows 10, you're getting this
error because *~\resultstree.xml* file does not exist.

If you create the *~* folder in the "bin" folder of your JMeter installation
and change the file path to *~\resulttree.xml* the issue will go away and
JMeter starts writing the results to the
*c:/path/to/your/jmeter/bin/~/resulttree.xml*


Going forward consider  enabling JMeter debug logging
<https://www.blazemeter.com/blog/how-to-configure-jmeter-logging/>   for the
"problematic" test element, in the majority of cases you will be able to get
some clue regarding where the problem is from the  jmeter.log file
<https://jmeter.apache.org/usermanual/get-started.html#logging>  :

<http://www.jmeter-archive.org/file/t340375/foo.png>  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Error loading result file with ~/ prefix in Windows 10

_elgato
Hi glinius,

thanks for your reply. I was under the impressiĆ³n that ~/ meant:

"Name of the file containing sample results. The file name can be
specified using either a relative or an absolute path name. Relative
paths are resolved relative to the current working directory (which
defaults to the bin/ directory). JMeter also support paths relative to
the directory containing the current test plan (JMX file). If the path
name begins with "~/" (or whatever is in the
jmeter.save.saveservice.base_prefix JMeter property), then the path is
assumed to be relative to the JMX file location." as declared in
https://jmeter.apache.org/usermanual/component_reference.html#listeners

However another definition is "Prefix used to identify filenames that
are relative to the current base.
Defaults to: ~/" in
https://jmeter.apache.org/usermanual/properties_reference.html#results_file_config

So running jmeter from the folder where the jmx is located
~/resulttree.xml should load correctly. But it works if we delete ~/
from the filename.

Thank you.
Regards.

On Mon, Apr 6, 2020 at 2:26 PM [hidden email] <[hidden email]> wrote:

>
> *~* symbol is a normal file or folder name in Windows 10, you're getting this
> error because *~\resultstree.xml* file does not exist.
>
> If you create the *~* folder in the "bin" folder of your JMeter installation
> and change the file path to *~\resulttree.xml* the issue will go away and
> JMeter starts writing the results to the
> *c:/path/to/your/jmeter/bin/~/resulttree.xml*
>
>
> Going forward consider  enabling JMeter debug logging
> <https://www.blazemeter.com/blog/how-to-configure-jmeter-logging/>   for the
> "problematic" test element, in the majority of cases you will be able to get
> some clue regarding where the problem is from the  jmeter.log file
> <https://jmeter.apache.org/usermanual/get-started.html#logging>  :
>
> <http://www.jmeter-archive.org/file/t340375/foo.png>
>
>
>
> --
> Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]