rpfaucher1
5 years agoContributor
How to obtain the name of the group when running a group of tests
Howdy, I have a project named "HermansProject" (just as an example lol).... from this project I have created two groups of tests... call them HermansGrp1 and HermansGrp2 (again, just as an example). ...
- 5 years ago
Hi,
Note: described below will work only if you started test execution using Test Items, exactly as you described. And will not work for tests started as individual routines or keyword tests.
As it is documented in the help topics that I mentioned previously: when TestComplete starts execution of Test Item(s), Project.TestItems.Current object refers to the currently executed test item of the lowest hierarchy. I.e., assuming, that the first test item under Full group is named as A, Project.TestItems.Current will reference test item A, but not Full.
Now you can iterate up the hierarchy of test items using the Parent property. Parent's value for the Full group will be null (Nothing for VBScript).