DetachHead / pytest-robotframework

a pytest plugin that creates robotframework reports for tests written in python and allows you to run robotframework tests with pytest
https://detachhead.github.io/pytest-robotframework/
MIT License
30 stars 3 forks source link

Duplicate keyword logging when the keyword with @keyword tag called from robot file #310

Closed mhnkrm closed 1 month ago

mhnkrm commented 1 month ago

When the keyword with @keyword called from robot file, duplicate logging is observed. Logging as part of robot framework and also from the decorator. How to avoid duplication?

DetachHead commented 1 month ago

pytest-robotframework has functionality to prevent this from happening. are you able to provide some more info please:

thanks

DetachHead commented 1 month ago

what command are you using to run the tests? if you're running it through robot, that's not supported and you should be using pytest instead. eg:

pytest ./path/to/suite.robot
DetachHead commented 1 month ago

can you see if #311 fixes it?

pip install git+https://github.com/DetachHead/pytest-robotframework@fix-library-keywords
DetachHead commented 1 month ago

merging this as im pretty sure it'll fix your issue. turns out keyword libraries written using classes were completely broken.

let me know if you still have issues and we can re-open this issue if needed