Forum Discussion
- MW_DidataRegular Contributor
Hmm, doesn't work for me either, the variable stays empty.
Maybe contacting TC support can get you the answers you need.
- rraghvaniChampion Level 3
Usage,
function one() { aqTestCase.Begin("One"); Log.Message("Test One"); Log.Message(aqTestCase.CurrentTestCase.Name); aqTestCase.End(); }
As mentioned, The aqTestCase.CurrentTestCase property returns information on the test case that is currently running. It can be: The tests specified in the Execution Plan editor of your project. By default, TestComplete treats all the tests added to the editor as test cases. Code fragments marked as test cases by using the aqTestCase.Begin and aqTestCase.End methods. Tests that are run by specifying their tags. BDD scenarios.
- DanNadContributor
rraghvani wrote:Usage,
function one() { aqTestCase.Begin("One"); Log.Message("Test One"); Log.Message(aqTestCase.CurrentTestCase.Name); aqTestCase.End(); }
As mentioned, The aqTestCase.CurrentTestCase property returns information on the test case that is currently running. It can be: The tests specified in the Execution Plan editor of your project. By default, TestComplete treats all the tests added to the editor as test cases. Code fragments marked as test cases by using the aqTestCase.Begin and aqTestCase.End methods. Tests that are run by specifying their tags. BDD scenarios.
Thanks for the explanation. Im afraid it would be a lot of work. In order to make this work with "aqTestCase.Begin..." i would have to modify 300+ Testscripts
Is there a more "automated" way. For example i have a Testscript MyTest.sj and i would like to get just the name of the current MyTest.sj and just remove the file extension.- Marsha_RModerator
What rraghvani explained *is* the automated way to do it. Before that feature was available, we had to save the test name in a variable at the top of every script and keep track of it ourselves.
With your tests, what I suggest doing is adding this feature into any new tests you are adding or in ones that you are editing. Next you can add it into the tests that run most often. Do the changes a little at a time and not try to do all 300+ at once.
- rraghvaniChampion Level 3
I can't think of any other simple ways of doing this.
Is the log output not good enough to view the details?
Related Content
- 2 years ago
- 4 years ago
Recent Discussions
- 9 hours ago
- 9 hours ago
- 16 hours ago