allure-framework / allure-python

Allure integrations for Python test frameworks
https://allurereport.org/
Apache License 2.0
718 stars 237 forks source link

Commas are not escaped in csv generated by behave formatter #717

Closed Alpherie closed 1 year ago

Alpherie commented 1 year ago

I'm submitting a ...

What is the current behavior?

Parameters for behave test are displayed incorrectly if there were commas in them. Incorrect amount of columns in bottom row, parameter values are split incorrectly by commas.

image

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

test.feature

Feature: Проверка
    Scenario: Проверка запятых в параметрах
        Given Шаг с запятыми в параметрах
            |param1             |param2             |
            |Запятая, запятая   |Второе значение    |

It would generate .csv file by formatter (-f allure_behave.formatter:AllureFormatter):

long_uuid_name-attachment.csv

param1,param2
Запятая, запятая,Второе значение

What is the expected behavior?

Parameter columns are displayed correctly, only 2 columns in lower row

What is the motivation / use case for changing the behavior?

Behave allows commas in parameters, but displayed incorrectly in allure

Please tell us about your environment:

delatrie commented 1 year ago

Hi, @Alpherie !

Thank you for such a comprehensive report! I was able to reproduce the bug. I will fix it soon and the fixed version will be released after a short time