Forum Discussion
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.
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.
Related Content
- 2 years ago
- 10 months ago