Forum Discussion

brook_grewcock's avatar
brook_grewcock
Contributor
10 years ago

Equivalent to this.name for logging?

I have a few keyword function and I would like to use 'Append Log Folder' to create a tree log structure, for all of these functions. I wondered if I could set the message text to a code expression and set that to 'this.name' (without apostrophes) to pickup the name of the function that called it, but this doesn't work.

 

Is there some kind of equivalent so that the append picks up the name of the keyword test it is running under?

  • If there is one, we've never been able to find it.   What we did was create a project variable for TestName and assign it at the top of every test.  The log can then display that variable.

1 Reply

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    If there is one, we've never been able to find it.   What we did was create a project variable for TestName and assign it at the top of every test.  The log can then display that variable.