Forum Discussion
rickm
14 years agoContributor
I wrote: "I don't see any such magic working in a script called from a Keyword Test, but it could be useful."
Sorry! The above sentence was very poorly worded. This is what I meant:
I don't see any such magic working in a script called from a Keyword Test, but this copy/paste feature between Keyword Tests could be useful.
"
I wasn't asking for anything similar to be added to scripts, but if somebody thinks of something workable, of curse go ahead. ;-)
Really, the thing that needs attention is that I can't seem to get "Project.TestItems.Current.Name" to work from Keyword Tests or scripts called from Keyword Tests. I submitted a support ticket for this a few minutes ago (M0097093) in case it doesn't get spotted here.
The copy/paste works like this:
Using the Keyword Test Editor, I created a Log Message:
Name: MessageText
Mode: Variable
Value: KeywordTests.Test14.Variables.Var1
Then I simply did CTRL-C on the line in Test14 and CTRL-V into Test15. Double-click the pasted entry and you'll see the test name has been changed to Test15 (the paste target).
I was quite surprised. I'm not sure why I even thought to test it. If you try to manually enter "KeywordTests.Test14.Variables.Var1" into Test15, you get the error message "Unknown variable container: KeywordTests.Test14.Variables".
Still, to get the currently running Keyword Test name I'd rather get "Project.TestItems.Current.Name" working since it doesn't require creating the variable for every new test.
Sorry! The above sentence was very poorly worded. This is what I meant:
I don't see any such magic working in a script called from a Keyword Test, but this copy/paste feature between Keyword Tests could be useful.
"
I wasn't asking for anything similar to be added to scripts, but if somebody thinks of something workable, of curse go ahead. ;-)
Really, the thing that needs attention is that I can't seem to get "Project.TestItems.Current.Name" to work from Keyword Tests or scripts called from Keyword Tests. I submitted a support ticket for this a few minutes ago (M0097093) in case it doesn't get spotted here.
The copy/paste works like this:
Using the Keyword Test Editor, I created a Log Message:
Name: MessageText
Mode: Variable
Value: KeywordTests.Test14.Variables.Var1
Then I simply did CTRL-C on the line in Test14 and CTRL-V into Test15. Double-click the pasted entry and you'll see the test name has been changed to Test15 (the paste target).
I was quite surprised. I'm not sure why I even thought to test it. If you try to manually enter "KeywordTests.Test14.Variables.Var1" into Test15, you get the error message "Unknown variable container: KeywordTests.Test14.Variables".
Still, to get the currently running Keyword Test name I'd rather get "Project.TestItems.Current.Name" working since it doesn't require creating the variable for every new test.