Snooz82 / robotframework-datadriver

Library to provide Data-Driven testing with CSV tables to Robot Framework
Apache License 2.0
131 stars 37 forks source link

Spaces around variablenames in CSV header destroy variable recognition #83

Closed Arvengeance closed 1 year ago

Arvengeance commented 1 year ago

Given

I have a CSV file with a header like this:

*** Test Cases ***;${jira};${next-value}

Now, since I work in VSCode, I use plugins to align the columns. My header looks then something like this:

*** Test Cases ***              ;${jira}    ;${next-value}
this is a really long text text ;ROBOTQA-421;foo

Behaviour

When running the testcase, i get an error that

Variable Variable '${jira}' not found.

If I remove the spaces in the header, it works.

Expected

Since variable is already wrapped in ${}, I would expect the spaces being trimmed.

Snooz82 commented 1 year ago

I am actually not really sure if that is a good or a bad thing. I mean sure, we can just strip the title row, but the stripping content would be a bad thing.

Arvengeance commented 1 year ago

I don't see the good thing ;) What is the use case of keeping spaces behind the closing bracket of the variable name?

Snooz82 commented 1 year ago

yea. you are right. I was just thinking about consistency. but i think i will just strip the headers. But i general i would not recommend to try to align csv!!!

Snooz82 commented 1 year ago

will be fixed in 1.7.0