Project.TestItems Property

Applies to TestComplete 14.71, last modified on April 22, 2021

Description

This property returns the TestItems object which provides a scripting interface to the hierarchy of tests to be executed by the current TestComplete project. For more information on project test items, see Test Items Page.

Declaration

Project.TestItems

Read-Only Property A TestItems object

Applies To

The property is applied to the following object:

Property Value

A TestItems object that represents the collection of test items for the given TestComplete project.

Example

The following example demonstrates how to obtain the list of project test items and how to post the name of the currently running test item to the log.

JavaScript, JScript

function Test()
{

  var TestItems;
  …
  TestItems = Project.TestItems;
  Log.Message("The " + TestItems.Current.Name + " test item is currently running.");
  …

}

Python

def Test():
  # ... 
  TestItems = Project.TestItems
  Log.Message("The " + TestItems.Current.Name + " test item is currently running.")
  # ...

VBScript

Sub Test

  Dim TestItems
  …
  Set TestItems = Project.TestItems
  Call Log.Message("The " & TestItems.Current.Name & " test item is currently running.")
  …

End Sub

DelphiScript

procedure Test();
var TestItems;
begin
  …
  TestItems := Project.TestItems;
  Log.Message('The ' + TestItems.Current.Name + ' test item is currently running.');
  …

end;

C++Script, C#Script

function Test()
{

  var TestItems;
  …
  TestItems = Project["TestItems"];
  Log["Message"]("The " + TestItems["Current"]["Name"] + " test item is currently running.");
  …

}

See Also

Test Items Page (Project Editor)
TestItems Object (Specific to Project Object)

Highlight search results