robotframework / robotframework/robotframework
Question: how to get keyword results in listener
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11.9k
- Forks
- 2.6k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 10
Description
Hello there, awesome work on Robot, thanks everyone
I have stupid question:
How to get keyword value in listener?
So for example I do have a testing library:
@library(scope="TEST", version="0.0.1", doc_format="ROBOT")
class Test:
@keyword
def test(self):
return 'result'
And I have listener(v3) with defined method end_keyword:
def end_keyword(
self, data: robot.running.model.Keyword, result: robot.result.Keyword
):
result.what? == 'result'
robot.result.Keyword looks like is not holding result, despite its name. And result is accessible to robot, because you can assign it to variable. But how to get it from listener?
Use case would be to collect artifacts in some other way.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the listener v3 end_keyword callback and the robot.result.Keyword object shown in the issue. Determine whether the keyword's returned value is exposed there and define what listener behavior would support collecting artifacts; the issue does not name a file or test to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100