Skip to content

Improve embedded keyword logging in output.xml #3750

Closed

Description

@MaciejWiczk

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:

Activity

  1. pekkaklarck commented on Nov 1, 2020

    @pekkaklarck
    Member

    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.

  2. MaciejWiczk commented on Nov 2, 2020

    @MaciejWiczk
    ContributorAuthor

    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?

  3. changed the title [-]Improve embedded keyword logging in output.xml and log.html[/-] [+]Improve embedded keyword logging in output.xml[/+] on Nov 5, 2020
  4. added this to the v4.0 milestone on Nov 24, 2020
  5. pekkaklarck commented on Nov 24, 2020

    @pekkaklarck
    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.

  6. added
    acknowledge
    on Dec 21, 2020
  7. pekkaklarck commented on Oct 5, 2023

    @pekkaklarck
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    acknowledgebeta 2priority: medium

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions