This can be achieved through the Indicator Object and the associated push method (see https://support.smartbear.com/testcomplete/docs/reference/program-objects/indicator/index.html). Why is it not included natively?
Define a "test". Is it a single script function? A keyword test? A test item in the project test organization panel? What exactly is the "test" you want to see showing up in the indicator.
Because a "test" may consist of any number of combinations of the above, having TestComplete automatically push to the indicator object what "test" you're running doesn't make sense. For example, in the project I'm currently working on, we are using Keyword tests for test cases. So, a single keyword test represents a test case. However, that keyword test consists of calling other keyword tests to run common tasks (adding a contact, updating a user role, etc) as well as executing script routines (searching for a cell in a web table, dragging an object from one point on the screen to another). So, a default "out of the box" pushing to the indicator every time we call a different keyword test or script routine is just as confusing... which test case, specifically, am I running when I see the indicator saying "Running WebPageLogin"?
To this end, I use the indicator object at the start of what I consider to be a test case and push the text I want to display. I have this integrated in my larger framework that pulls that test case name from an SQL table and pushes it to the indicator object along with whatever parameters I may be utilizing in executing the test case. I then "pop" that text at the end of that test case and "push" the next text at the start of the next test case.
Actually, I have this wrapped up in a Script Extension I wrote called TestLogUtils that has the additional bonus of adding "folders" to the test log to better organize the log so that, rather than all the test cases showing up in one large mass, I can expand or collapse nodes in my test log that correspond to my test cases. Feel free to download and utilize that extension to give you this functionality.
Related Content
- 10 months ago
- 2 years ago
- 4 years ago
- 13 years ago