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

When will you refactor the Data Model? #12

Closed DoanhPoPu closed 4 years ago

DoanhPoPu commented 5 years ago

I'm using xlsx as data sources and would like to remove the variable pattern as current. If we can remove $ or @ so it will be more friendly with manual tester and the old files they had. I love your lib but we need to improve more so the community can use easily.

Thanks, Doanh Nguyen

Snooz82 commented 5 years ago

You can create your own DataReader. It is quite easy.

https://github.com/Snooz82/robotframework-datadriver/blob/master/Readme.rst#custom-datareader-classes

When you want to have a XLS-Reader that does not require variable syntax, you have to override/implement the method _analyse_header in your custom reader.

You can copy it from Abstract_Data_Reader . And not use the _is_variable() method.

For CSV there is the generic_csv_reader.py . This one requires nothing. It just takes all columns as Variables.

I prefer the variable syntax, because the link is clear. In the future @ and & will also be available to support lists and dictionaries.

Regards.

Snooz82 commented 5 years ago

If you have implemented a generic_xls_reader, please create a pull request, then i will include it into the project

DoanhPoPu commented 5 years ago

Thanks Snooz82. So I will keep the variable pattern as current, I will modify the old xlsx data sources into new pattern as the lib required. Thanks for your valuable lib ;)