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.2k stars 2.07k forks source link

Prevent mixed CSV columns #3828

Open asfimport opened 8 years ago

asfimport commented 8 years ago

Sebb (Bug 59000): JMeter by default appends data to an existing response data file.

If the columm list changes this causes problems for CSV files.

When appending to an existing CSV file, the code should check if the settings are compatible.

If not, then some action should be taken, e.g. abandon the test or rename the output file so the existing file is not compromised.

If the existing file has a header line, then a simple comparison of the text is sufficient to determine if the column settings are equal.

For files without headers, the code can check if the column count is the same. It can potentially also check whether the expected columns are numeric.

OS: All

asfimport commented 8 years ago

@pmouawad (migrated from Bugzilla): Isn't it easier and better to just not append ? Either fail if target file exists or rename it ?

asfimport commented 8 years ago

Sebb (migrated from Bugzilla): (In reply to Philippe Mouawad from comment 1)

Isn't it easier and better to just not append ? Either fail if target file exists or rename it ?

JMeter has always allowed output to be appended, and that works fine if the settings are not changed. Indeed it can be quite useful.

Disallowing all appends would break customer scripts that rely on the behaviour; we cannot arbitrarily change how JMeter works.