Returns the number of test/task objects in the object.
[ lTestsCount = ] Object.TestsCount
The TestsCount property syntax has the following parts:
Name |
Type |
Description |
Object |
AProgram |
AProgram object |
lTestsCount |
Long |
An integer specifying the number of test/task objects in the object. The default value is 0. |
The following example lists the names of the top level tasks/tests under the current program:
print "Program "; Program.Id; " has "; Program.TestsCount; " top level Tasks/Tests"
for n=1 to Program.TestsCount
obTest=Program.Tests(n-1)
if obTest.IsTask
print "Task ";
else
print "Test ";
endif
print obTest.Name
next