Forum Discussion

Novari-QA's avatar
Novari-QA
Frequent Contributor
8 years ago

Get Keyword Test name via script

In a keyword test, you are able to call a script routine, in this script routine I want to be able to capture the name of the keyword test that ran the script routine.  is this possible?
  • tristaanogre's avatar
    tristaanogre
    8 years ago

    Would be nice... but currently not available.  The parameter method you're using is the best bet that I know of.

     

    The only thing you could do differently would be to set some global variable at the start of the keyword test that indicates the name of the keyword test.  Then reference that variable internally in your script.  You could get rid of the parameter, but it's 6 one way, half a dozen the other in the amount of code you need to write.

     

    Feel free to make a feature request... it would be cool to implement some sort of "caller" property internally in TestComplete so that, if you're not using something like JavaScript or you're using keyword test, you can build your current call stack.