Forum Discussion
3 Replies
- chrisbRegular Contributor
Thats correct. There are no methods in Test Complete to do this. In Javascript you can get the whole function that is currently executing and then use a regex to parse the function name. See this answer on Stack Overflow, stackoverflow.com/questions/1935521
In my project I get the name of the currently running test and store it in a project suite variable by doing the following
ProjectSuite.Variables.test_name = arguments.callee.toString().match(/function ([^\(]+)/)[1];
- mczerwinNew Contributor
Do you know if it is possible to do this in VB script?
- chrisbRegular Contributor
A Google search takes me to this...
http://stackoverflow.com/questions/2051217/get-the-name-of-the-current-method