Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55294

Exported CSV results do not escape double quotes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Jenkins version 2.32.1, Test Results Analyzer plugin 0.3.5

      We have a large number of test cases with double quotes (") in their names. This is possible because we use parameterised NUnit Test Cases; the parameters are combined with the test name to form a unique test name, and whenever a parameter is a string it is surrounded by double quotes as part of this process. For example if a test had three parameters (two doubles and a string) then two of its test cases might be written as:

      • Class_Method_ExpectedInputs_ExpectedOutputs(1.23,4.56,"Some string parameter")
      • Class_Method_ExpectedInputs_ExpectedOutputs(7.89,9.99,"Some other string parameter")

      These do get exported to the CSV file, but the double quotes are not escaped, meaning that the CSV cannot be read correctly because the separators/commas are interpreted wrongly.

      I think it should be relatively easy to fix this by replacing all double quotes in test case names with a pair of double quotes as part of the export process.

            menonvarun Varun Menon
            cwilso99 Christopher Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: