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

Modified code to confirm with proper(?) listener syntax. #3

Closed emanlove closed 5 years ago

emanlove commented 5 years ago

I have not yet worked with the listner interface so this change might be incorrect. In getting the example to run as I expected I did some minor modification to the code and have included some documentation on how I run it. Please correct me if I am heading down the wrong path with these changes.

Snooz82 commented 5 years ago

A „normal“ listener which runs globally would be called from command line / terminal like you suggested. This pull Request will not be added.

The datadriver is designed to work as a suite local listener. Because it is imported to the suite as Library, the Listener Object is created just before this suite starts. And because in every suite there might be a different or no CSV File, i used the possibility to announce a library as a listener. If you do not need a datadriver for a specific robot suite you just do not import this lib.

The _start_suite method is called by the listener API when the actual suite starts.

The _ has been added because i do not want to have it as a potential Keyword in the libdoc.

I will add sone documentation for this.