You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support keywords and control structures with listener version 3 #3296
The problem implementing this is that on the execution side there currently isn't any place where we could call start/end_keywords so that they would get data and result objects similarly as other listener v3 methods get. Changing that would require quite big changes to the code and doing them just to get this feature implemented hasn't been considered worth the effort.
In RF 4.0 the plan is to add new features like IF/ELSE (#3074) that require big changes to the execution side. When doing them, this issue definitely needs to be taken into account. Thus assigned this one to the v4.0 scope.
changed the title [-]Support for start/end_keyword in listener version 3[/-][+]Support for `start/end_keyword` in listener version 3[/+]on Feb 15, 2020
Hi @bergstenarn and @Snooz82 ,
I'm not sure what those problems mentioned by @pekkaklarck are. Maybe there are some potential issues, but I patched the keyword runners to get something similar, and it worked fine for me:
rfswarm agent uses the following version 2 api methods:
start_suite
log_message
end_keyword
So not having "end_keyword" in the version 3 listener API is preventing me upgrading rfswarm from the version 2 API, fortunately the version 2 API works in Robot Framework V3 and hopefully won't be depreciated be in Robot Framework V4?
Tests have been added. There are only two tests in the body_items_v3.robot file under atest/robot, but they are pretty thorough. The first test validates that all listener methods are called and the latter validates modifying data. You can see tests. listeners and a library these tests use in the body_items_v3 directory under atest/testdata. If you are interested in all interesting (and to some extend crazy) ways the data can be manipulated, see the the DataModifier listener.
I wrote earlier that it might be a good idea to add error codes or some other mechanism for differentiating various error situations to ease handling them. I still believe it could be useful, but I'm not sure how important it would be or how it should actually work. I believe this is something that's best left for the future.
This feature ought to now be ready except for documentation. That mainly means User Guide, but probably API docs can be enhanced as well. That's something we can do after beta 1 or even after we have a release candidate out.
There were still problems related to modifying results. Because information was already written to output.xml, modifications didn't have any real effect. That was fixed by the above commit, and more tests for modifying results will be committed shortly. Tests are modified quite a bit also otherwise (for example, there will be multiple tests under atest/robot), but they use the same files that were mentioned in the comment above. Hopefully this feature is now ready except for documentation.
changed the title [-]Support for `start/end_keyword` in listener version 3[/-][+]Support keywords and control structures with listener version 3[/+]on Dec 15, 2023
Activity
pekkaklarck commentedon Feb 15, 2020
The problem implementing this is that on the execution side there currently isn't any place where we could call
start/end_keywordsso that they would get data and result objects similarly as other listener v3 methods get. Changing that would require quite big changes to the code and doing them just to get this feature implemented hasn't been considered worth the effort.In RF 4.0 the plan is to add new features like IF/ELSE (#3074) that require big changes to the execution side. When doing them, this issue definitely needs to be taken into account. Thus assigned this one to the v4.0 scope.
[-]Support for start/end_keyword in listener version 3[/-][+]Support for `start/end_keyword` in listener version 3[/+]Snooz82 commentedon Apr 29, 2020
i really like this feature.
including line numbers for start and end keyword!
This would be a huge enabler for debuggers!
dakaizou commentedon Aug 11, 2020
Hi @bergstenarn and @Snooz82 ,
I'm not sure what those problems mentioned by @pekkaklarck are. Maybe there are some potential issues, but I patched the keyword runners to get something similar, and it worked fine for me:
mkorpela commentedon Sep 16, 2020
Related draft pull request #3672
damies13 commentedon Nov 11, 2020
Hi,
rfswarm agent uses the following version 2 api methods:
So not having "end_keyword" in the version 3 listener API is preventing me upgrading rfswarm from the version 2 API, fortunately the version 2 API works in Robot Framework V3 and hopefully won't be depreciated be in Robot Framework V4?
damies13/rfswarm#67
For my project I would be happy to skip V3 and jump to V4 if end_keyword never gets implemented in V3 but does get implemented in V4 api methods.
32 remaining items
Add running.(For|While)Iteration
Add new listener v3 methods to `robot.api.interfaces` #3296
Allow `start_invalid_keyword` listener method to handle errors.
Test that new listener v3 methods are called correctly. #3296
Add tests for listener v3 methods modifying body items.
pekkaklarck commentedon Dec 14, 2023
Tests have been added. There are only two tests in the body_items_v3.robot file under
atest/robot, but they are pretty thorough. The first test validates that all listener methods are called and the latter validates modifying data. You can see tests. listeners and a library these tests use in the body_items_v3 directory underatest/testdata. If you are interested in all interesting (and to some extend crazy) ways the data can be manipulated, see the the DataModifier listener.I wrote earlier that it might be a good idea to add error codes or some other mechanism for differentiating various error situations to ease handling them. I still believe it could be useful, but I'm not sure how important it would be or how it should actually work. I believe this is something that's best left for the future.
This feature ought to now be ready except for documentation. That mainly means User Guide, but probably API docs can be enhanced as well. That's something we can do after beta 1 or even after we have a release candidate out.
Write body item docs, tags, etc. after nested items in output.xml
pekkaklarck commentedon Dec 15, 2023
There were still problems related to modifying results. Because information was already written to output.xml, modifications didn't have any real effect. That was fixed by the above commit, and more tests for modifying results will be committed shortly. Tests are modified quite a bit also otherwise (for example, there will be multiple tests under
atest/robot), but they use the same files that were mentioned in the comment above. Hopefully this feature is now ready except for documentation.Test new listener v3 methods modifying results (#3296)
[-]Support for `start/end_keyword` in listener version 3[/-][+]Support keywords and control structures with listener version 3[/+]Document new listener v3 methods in the User Guide.