1- Create a new test plan that includes a sampler 2- Add an assertion that you are sure is going to fail when you run the test. 3- Add a Simple Data Writer listener and make sure you set it to save in CSV format and to show the assertion failure message 4- Run the test The assertion failure message starts with "Test failed, " which includes a comma. Commas are used as the delimiter for the CSV file so the resulting CSV file will contain an extra field.
This is a general problem with the CSV format - for example, a label can contain a comma. However it's trivial to fix this case (and the user has no control over it), so I'll replace the comma as a work-round.
r583492 in trunk. Will create new bug for general CSV enhancement.
Forgot to add - in the meantime, a work-round would be to use a different delimiter. For example, use tab. This can be set in the jmeter.properties file as follows: jmeter.save.saveservice.default_delimiter=\<tab> where <tab> is a tab character - not the characters < t a b > The next version of JMeter will allow \t as well to make it easier.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2032