Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Improve embedded keyword logging in output.xml #3750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MaciejWiczk opened this issue Nov 1, 2020 · 4 comments
Closed

Improve embedded keyword logging in output.xml #3750

MaciejWiczk opened this issue Nov 1, 2020 · 4 comments
Labels
Milestone

Comments

@MaciejWiczk
Copy link
Contributor

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:

@pekkaklarck
Copy link
Member

pekkaklarck commented 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
Copy link
Contributor Author

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?

@MaciejWiczk MaciejWiczk changed the title Improve embedded keyword logging in output.xml and log.html Improve embedded keyword logging in output.xml Nov 5, 2020
@pekkaklarck pekkaklarck added this to the v4.0 milestone Nov 24, 2020
@pekkaklarck
Copy link
Member

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
Copy link
Member

pekkaklarck commented Oct 5, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants