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 2018/02/23 07:29:21 UTC

[Bug 62127] New: CSV Data Set Config changes slash in filename path into backslash

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

            Bug ID: 62127
           Summary: CSV Data Set Config changes slash in filename path
                    into backslash
           Product: JMeter
           Version: 4.0
          Hardware: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: benny@smaragd-it.nl
  Target Milestone: ---

The CSV Data Set Config element changes a '/' entered in the Filename field
automically into a '\' when saving test plan.

Situation:
- Open a file with a CSV Data Set Config element
- Edit the path to contain e.g. testdata/myfile.csv
- Pressing Save will change the / into \

On Windows this still works, but when running the script on Jenkins this causes
problems: the file cannot be found.

Tested and reproduced on:
OS: Windows 8 
LAF: Metal, Nimbus, Darcula

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

[Bug 62127] CSV Data Set Config changes slash in filename path into backslash

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

--- Comment #9 from Felix Schumacher <fe...@internetallee.de> ---
Will be included in v4.1

@Benny, could you test the fix?

Date: Sat Feb 24 17:01:14 2018
New Revision: 1825265

URL: http://svn.apache.org/viewvc?rev=1825265&view=rev
Log:
Store filename as String instead of File in FileEditor.

This will prevent conversion of filenames from unix style path separators
to Windows style when used for example in CSV Data Set Config.

Bugzilla Id: 62127

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/FileEditor.java
    jmeter/trunk/xdocs/changes.xml

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

[Bug 62127] CSV Data Set Config changes slash in filename path into backslash

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

--- Comment #6 from Felix Schumacher <fe...@internetallee.de> ---
That behaviour is because of the File#getPath converts the path separators
under Windows to backslashes. The File is used in FileEditor.

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

[Bug 62127] CSV Data Set Config changes slash in filename path into backslash

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

--- Comment #12 from Benny van Wijngaarden <be...@smaragd-it.nl> ---
Do you have any idea when version 4.1 will be released? I have to decide
whether to rollout the snapshot version in my team or wait for the 4.1 release.

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

[Bug 62127] CSV Data Set Config changes slash in filename path into backslash

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |toh2526@msn.com

--- Comment #13 from Felix Schumacher <fe...@internetallee.de> ---
*** Bug 62715 has been marked as a duplicate of this bug. ***

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

[Bug 62127] CSV Data Set Config changes slash in filename path into backslash

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

Benny van Wijngaarden <be...@smaragd-it.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Benny van Wijngaarden <be...@smaragd-it.nl> ---
Possible workaround: enclose the Filename path string in a BeanShell function. 
Example: ${__BeanShell("testdata/myfile.csv")}

This leaves the string untouched when the Test Plan is saved.

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

[Bug 62127] CSV Data Set Config changes slash in filename path into backslash

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

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om

--- Comment #2 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Hello,
What is your java version ?
Also is it OpenJDK or Oracle ?

Thanks

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

[Bug 62127] CSV Data Set Config changes slash in filename path into backslash

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

--- Comment #7 from Felix Schumacher <fe...@internetallee.de> ---
Created attachment 35741
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35741&action=edit
Store filename as string not as a file

The FileEditor component is used to edit/select filenames. It currently stores
the filename as a File. That is problematic as java will convert slashes (/) to
backslashes (\) when running on Windows.

This patch will store the filenames as simple String instances. That way no
conversion will be done by java, except when filenames get selected through a
file chooser dialog. In that case the patch will convert the backslashes to
slashes when run on Windows.

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

[Bug 62127] CSV Data Set Config changes slash in filename path into backslash

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

--- Comment #4 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Hello,
Can you try with last Oracle JDK 8 ?
Thanks

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

[Bug 62127] CSV Data Set Config changes slash in filename path into backslash

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

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |JMETER_4.1
           Keywords|                            |FixedInTrunk

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

[Bug 62127] CSV Data Set Config changes slash in filename path into backslash

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

--- Comment #8 from Felix Schumacher <fe...@internetallee.de> ---
If this patch works, would it be sensible to remove the inner class
SimpleFileEditor from FileEditor? It seems to have no function anymore (when
the patch is applied).

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

[Bug 62127] CSV Data Set Config changes slash in filename path into backslash

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEEDINFO                    |RESOLVED

--- Comment #11 from Felix Schumacher <fe...@internetallee.de> ---
(In reply to Benny van Wijngaarden from comment #10)
> Tested the fix: OK
> 
> I replaced ApacheJMeter_core.jar in the 4.0 release by the one from the
> nightly build of today. @Philippe or Felix, do you expect any problems doing
> this?

What exactly do you mean by "this"? Do we expect problems when replacing the
core jar or by the patch itself?

In case of the patch itself, I don't expect problems.

In case of replacing the jar, I think you might be safer replacing all jars
(though if it works for you, it is probably OK for the nightly you chose).

As you confirmed that the problem is fixed, I will close this bug. Thanks for
the report and the confirmation.

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

[Bug 62127] CSV Data Set Config changes slash in filename path into backslash

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

--- Comment #3 from Benny van Wijngaarden <be...@smaragd-it.nl> ---
We use C:\Program Files (x86)\IBM\WebSphere\AppServer-85\java_1.8_64 to start
JMeter

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

[Bug 62127] CSV Data Set Config changes slash in filename path into backslash

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

--- Comment #5 from Benny van Wijngaarden <be...@smaragd-it.nl> ---
I did, same behaviour

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

[Bug 62127] CSV Data Set Config changes slash in filename path into backslash

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

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

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

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

[Bug 62127] CSV Data Set Config changes slash in filename path into backslash

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

--- Comment #10 from Benny van Wijngaarden <be...@smaragd-it.nl> ---
Tested the fix: OK

I replaced ApacheJMeter_core.jar in the 4.0 release by the one from the nightly
build of today. @Philippe or Felix, do you expect any problems doing this?

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