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
Improve embedded keyword logging in output.xml #3750
Embedded keywords are great improvement when comes to testcases readability, but can be cumbersome when debugging logs and processing them.
Having following keyword:
*** Test Cases ***
Add One To Two
Add 1 To 2
Add Two To One
Add ${a} To ${b}
*** Variables ***
${a} 1
${b} 2
*** Keywords ***
Add ${n} To ${m}
${o} Evaluate ${n}+${m}
will be processed in both log.html and output.xml as either Add 1 To 2 or Add ${a} To ${b} while it's actual definition, Add ${n} To ${m} isn't stored in logs. It would be nice improvement, to allow to store keywords definition in addition to current keyword properties.
Such a change would allow for post processing output.xml for statistical and analytical purposes, which I'm facing in rfhub2
I found few places, which would need to be changed:
Do I get it right that you'd like to store the original name of the keyword somewhere? Would it need to be in logs or would having it only in output.xml be enough? I guess it could be added as a new attribute to the <kw> element.
A problem with adding info like this to output.xml is that its size will be increased. If this is done only with keywords using embedded arguments, that shouldn't be too big a problem, though.
Hi @pekkaklarck, You are exactly right. This argument could be only logged when keyword is embedded keyword, otherwise keyword definition, or however this attribute is called, would be the same as name/longname and skipped. Storing it in output.xml is enough for me, but maybe, using DEBUG/TRACE level, and storing in log.html, would be useful for others.
Last, but not least, did I get to right places, where changes should be applied first?
changed the title [-]Improve embedded keyword logging in output.xml and log.html[/-][+]Improve embedded keyword logging in output.xml[/+]on Nov 5, 2020
The sourcename attribute introduced by this issue will be renamed to source_name in RF 7.0 (#4884). The old attribute will be preserved as a deprecated property.
Activity
pekkaklarck commentedon Nov 1, 2020
Do I get it right that you'd like to store the original name of the keyword somewhere? Would it need to be in logs or would having it only in output.xml be enough? I guess it could be added as a new attribute to the
<kw>element.A problem with adding info like this to output.xml is that its size will be increased. If this is done only with keywords using embedded arguments, that shouldn't be too big a problem, though.
MaciejWiczk commentedon Nov 2, 2020
Hi @pekkaklarck, You are exactly right. This argument could be only logged when keyword is embedded keyword, otherwise keyword definition, or however this attribute is called, would be the same as name/longname and skipped. Storing it in output.xml is enough for me, but maybe, using DEBUG/TRACE level, and storing in log.html, would be useful for others.
Last, but not least, did I get to right places, where changes should be applied first?
[-]Improve embedded keyword logging in output.xml and log.html[/-][+]Improve embedded keyword logging in output.xml[/+]pekkaklarck commentedon Nov 24, 2020
I think this is a good idea and assigned this issue tentatively to RF 4.0 scope. I also commented the PR with changes that should still be done.
pekkaklarck commentedon Oct 5, 2023
The
sourcenameattribute introduced by this issue will be renamed tosource_namein RF 7.0 (#4884). The old attribute will be preserved as a deprecated property.