apache / jmeter

Apache JMeter open-source load testing tool for analyzing and measuring the performance of a variety of services
https://jmeter.apache.org/
Apache License 2.0
8.3k stars 2.09k forks source link

Make CSV Data Set Config use specified encoding #1869

Closed asfimport closed 17 years ago

asfimport commented 17 years ago

Alf Hogemark (Bug 41704): Currently, the CSV Data Set Config does not allow the user to specify what character set encoding is used in the csv file which contains the test data to use in a Jmeter test.

Therefore, the csv data files must have the default system character set encoding. Currently, it is the java class FileReader which is used to read the file, and that assumes the default platform character set encoding for the file.

It would be useful to be able to specify the character set encoding used in a csv data file, so that you can use different encodings. That will also allow you to use the same data files on different operating systems, which can have different default character set encodings.

OS: All

asfimport commented 17 years ago

Alf Hogemark (migrated from Bugzilla): This is a patch agaist SVN svn.apache.org/repos/asf/jakarta/jmeter/branches/rel-2-2 as of today.

Comments / suggestions to the patch are welcomed.

Created attachment patch_csv_data_set_with_encoding.patch: Suggested patch to add encoding to CSV data set

asfimport commented 17 years ago

Sebb (migrated from Bugzilla): Thanks for the contribution.

Looks mostly OK.

However, it changes the public API of the FileServer class, as the reserveFile method now has an extra parameter. This could cause 3rd party applications to fail. Easy enough to resolve by overloading the method.

Also, the encoding could perhaps be added to the FileEntry class instead of using a separate HashMap.

I'll see about adding this - no need to recreate the patch at present.

asfimport commented 17 years ago

Sebb (migrated from Bugzilla): Added to SVN. Will be in nightly builds after r516795.