Is it Possible to use CurrentTest as
I sometimes use Code Expressions as a parameters to call other tests or scripts. But, I have not found an easy way to copy/paste these test step into another test without having to manually update the test name (from the old test to the new test name).
A code expression I may pass would look like this:
KeywordTests.Copy_Station.Variables.Station_12345 + " - COPY"
KeywordTests.TEST_NAME.Variables.VARIABLE_NAME + " - COPY"
But I would rather do something like the following, so as I copy/paste I don't need to modify the test name each time I need to use the same function:
ProjectSuite.TestItems.Current.VARIABLE_NAME
or
THIS_TEST.Variables.VARIABLE_NAME + " - COPY"
or
CURRENT_TEST.Variables.VARIABLE_NAME + " - COPY"
I assume this is possible in TC and some of you do something similar but can't come up with a solution that seems to work. Any suggestions are appreciated. I have tried multiple times over the years (and read endless documentation and community posts) but I figure someone out there has a solution they have found useful.