Bug 59000 - Prevent mixed CSV columns
Summary: Prevent mixed CSV columns
Status: NEW
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.13
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-12 20:18 UTC by Sebb
Modified: 2016-02-13 14:12 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebb 2016-02-12 20:18:52 UTC
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.
Comment 1 Philippe Mouawad 2016-02-13 13:22:08 UTC
Isn't it easier and better to just not append ?
Either fail if target file exists or rename it ?
Comment 2 Sebb 2016-02-13 14:01:05 UTC
(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.