Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recipe request: working with data stored in CSV or Excel #6

Open
adrianyorke opened this issue Mar 3, 2020 · 5 comments
Open

Recipe request: working with data stored in CSV or Excel #6

adrianyorke opened this issue Mar 3, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@adrianyorke
Copy link
Owner

adrianyorke commented Mar 3, 2020

A common use case is to import a list of values or test data from an external data file, e.g. CSV or Excel.

A recipe demonstrating how to do this would be useful for many test case scenarios.

@AdamHepner
Copy link

I'm not sure how it could work with Excel out of the box (apart from storing suite files in .tsv format which used to be supported, but isn't anymore - if I remember correctly). For CSV you'd probably have to implement basic python library that would expose the data, and yaml works more-or-less out of the box, provided your RF instance has pyyaml installed.

I actually published an article on Robot Framework test parameterization, literally yesterday: https://wonderproxy.com/blog/parameterizing-robot-framework/

@adrianyorke
Copy link
Owner Author

Thanks @AdamHepner, nice article.

I was thinking an RF Library based on Python's openpyxl: https://openpyxl.readthedocs.io/en/stable/
It might be easier to create my own library and use something like Pandas to import all the data.

There is also datadriver for data driven testing which works with Excel and other formats: https://pypi.org/project/robotframework-datadriver/

@adrianyorke
Copy link
Owner Author

There's also this library based on pandas:
https://github.com/koshtinikhilesh/robotframework-PandasLibrary

@adrianyorke adrianyorke changed the title Recipe request: working with Excel Recipe request: working with data stored in CSV or Excel Mar 4, 2020
@adrianyorke adrianyorke added the enhancement New feature or request label Mar 5, 2020
@ericbjones
Copy link
Collaborator

@adrianyorke you do know that exact thing already exists right ;) ?
https://pypi.org/project/robotframework-excellib/

Robot Framework library for working with Excel documents, based on openpyxl.

@avinashravi96
Copy link

avinashravi96 commented Jul 20, 2021

if we implemented pandas based robot framework library will be more advanced.
Pandas have tons of features like read csv, excel etc and also. we can convert our data into list, dictionary types and many types.
which am currently used to verify tables in web UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants