pkudrys's avatar
pkudrys
Contributor
2 months ago
Status:
New Idea

function to get the name of a module started via Run Keyword Test

Please add a function to get the name of a keyword module, started from another keyword module. I need this to quickly identify a failing module in event handler and to quickly navigate in test report. 

I'm aware of below methods, but all of them return only the name of main module, from which the child module was run (via Run Keyword Module):
Project.TestItems.Current.Name - returns name of the main keyword module
aqTestCase.CurrentTestCase.Name - returns name of the main keyword module
Project.TestItems.Current.ElementToBeRun.Caption - returns "KeywordTests -" +  name of the main keyword module

For now, I solved the problem by adding Set Variable Value action at start of every keyword module, which sets the project variable with hardcoded module name. But I don't like this solution, because it requires more steps and can cause potential failure in case the module name changes and someone forgets to change the hardcoded string in given module. 

 

No CommentsBe the first to comment