TestsCount Property (AProgram)

Returns the number of test/task objects in the object.

Syntax

[ 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.

Example

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

Applies to

AProgram

See Also

Tests