Bug 59000

Summary: Prevent mixed CSV columns
Product: JMeter Reporter: Sebb <sebb>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: NEW ---    
Severity: enhancement CC: p.mouawad
Priority: P2    
Version: 2.13   
Target Milestone: ---   
Hardware: All   
OS: All   

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.