On the Test Items page of your project, you can view and change the test run order of your project. To open the Test Items page, do any of the following:
Select View > Organize Tests from the TestComplete main menu.
Double-click the project node in the Project Explorer to open the project editor and then switch to the Test Items page.
Select your project in the Project Explorer and click Organize Tests on the panel’s toolbar.
Right-click your project in the Project Explorer and select Edit > Test Items from the context menu.
The Test Items page shows the project’s test items in the order they will be run. A test item can be:
You can organize test items into a plain list, grouped list or a tree-like structure (where child items are run after the parent item has finished running). You can exclude test items from or include them in the test run using the check box next to the test item name.
The following table contains descriptions of test item properties.
Test item properties are not applied to tests that are not launched as test items (for example, they are launched from the Project Explorer or are called from another test).
|Name||The test item name.|
|Test case||Marks the test item as a test case. This item will be included in the Summary report.
|Execution entity||The project item to be run. It can be:
To choose a test, click the ellipsis button and use the resulting Select Test dialog.
|Count||The number of times the test will be repeated. Default is 1.|
|Timeout||The maximum run time (in minutes) for the test item. If the run time exceeds the timeout, TestComplete posts an error to the test log and generates the
Default is 0, which means no timeout.
|Parameters||If a test item is a script routine or a keyword test that takes parameters, this column specifies the parameter values.
If the test item is a tag expression, it specifies the expression.
Click the ellipsis button and specify the needed values or expression in the resulting Test Parameters dialog.
You can use either hard-coded parameter values, or project variables.
Specifies what TestComplete will do if an error occurs during the test item run:
For more information on using the On error property, see About Controlling Test Execution Flow.
Note: This property does not apply to errors that occur on remote computers during distributed testing.
|On exception||Specifies what TestComplete will do if an unhandled script exception occurs during the test item run. Some examples of these exceptions are: an invalid function name, an invalid parameter value, and so on.
This property is effective only if the Show a notification when an unhandled script exception occurs option is disabled in your project.
For more information on using this option, see About Controlling Test Execution Flow.
|Link to external test case||Specifies an external test case to which your test item is linked. It can be a test case stored in:
You can click the ellipsis button and select the needed test case in the resulting wizard. If your TestComplete project is not bound to any external project yet, select either Zephyr for Jira or Azure DevOps, configure the connection to the needed project in the selected system, and then select the needed test case.
Linking TestComplete test items to Azure DevOps test cases makes sense only if your current TestComplete project is stored in your team project’s repository. Otherwise, those Azure DevOps test cases will not be able to access your TestComplete tests.
If you use Zephyr for Jira, you can also type the identifier of an external test manually. To bind your test item to a Zephyr test case, use the following format:
|Description||An arbitrary description of the test item.|
If a column is hidden, to make it visible, right-click anywhere on the page, click Field Chooser, and then drag the needed column from the resulting list to the page.
You can customize the column layout. For example, you can reorder or hide some columns. For more information, see Arranging Columns, Lines and Panels.
To add a new top-level test item, do any of the following:
Click New Test Item on the toolbar.
Right-click somewhere within the Test Items page and choose New Item from the context menu.
Drag the desired test (for instance, a keyword test, a unit test and so on) from the Project Explorer panel to the Test Items page.
If you drag and drop a script unit, TestComplete will add test items corresponding to all of the script routines contained in that unit.
TestComplete will name the created test items based on the source script routine and keyword test names.
Drag a script routine from the Code Explorer panel to the Test Items page.
|Note:||By default, all added test items are marked as test cases.|
To add a child test item to an existing test item, do any of the following:
Select the parent test item or group and click New Child Test Item on the toolbar.
Right-click the parent test or group and choose New Child Test Item from the context menu.
Drag the desired test from the Project Explorer or Code Explorer and drop it in the parent test item.
Once you have added a new test item, you can modify its properties and relocate it in the list.
To add a top-level group:
Click Add New Group on the toolbar.
– or –
Right-click somewhere within the Test Items page and choose New Group from the context menu.
To add a subgroup:
Select the parent test item or group and click New Subgroup on the toolbar.
– or –
Right-click the parent test or group and choose New Subgroup from the context menu.
Select the cell that contains the data you want to change, and press F2 or click twice (not double-click).
To change the test to be executed:
Click the ellipsis button of the Execution entity column.
In the resulting Select Test dialog, select the needed test or tag. To run tests that match several tags, select [Tag Expression].
To modify test item parameters, click the ellipsis button within the Parameters cell and use the resulting Test Parameters dialog.
To modify a tag expression:
Click the ellipsis button in the Parameters column of the [Tag Expression] test item.
In the resulting Test Parameters dialog, specify the needed tag expression.
@ before tag names, that is, use
@tag1 rather than
To combine tags, use the
not operations, for example:
@tag1 or @tag2
@tag1 and not @tag3
not rather than
@tag1 and not @tag2 ← Correct!
@tag1 && !@tag1 ← Incorrect!
If needed, you can use braces to group tags, for example:
@tag1 and (@tag2 or @tag3)
(@tag1 or not @tag2) and (not @tag3 or @tag4)
Select the group and press F2, or click the group twice (not double click).
Enter the new name for the group and press Enter to apply it.
Select the source test item or group and click Copy on the Standard toolbar or press Ctrl+C.
Click Paste on the Standard toolbar or press Ctrl+V.
– or –
Right-click the source test item or group and select Copy from the context menu.
Right-click somewhere within the Test Items page and choose Paste from the context menu.
|Note:||Currently, you can copy test items and groups within the same project. You cannot copy an item from one project to another.|
TestComplete allows you to easily specify which test items should participate in testing and which should be temporarily excluded.
To enable or disable a single test item or group:
Select or clear the check box next to the test item’s icon.
To enable or disable several test items at once:
Select the desired test items in the panel using Ctrl- and Shift-clicks.
Click the Enable Selected or Disable Selected button on the toolbar.
– or –
Right-click the selection and choose Enable\Disable > Enable Selected or Enable\Disable > Disable Selected from the context menu.
To enable or disable all of the test items:
Click the Enable All or Disable All button on the toolbar.
– or –
Right-click somewhere within the Test Items page and select Enable\Disable > Enable All and Enable\Disable > Disable All from the context menu.
To toggle the enabled property of all test items:
Click the Toggle All button on the toolbar.
– or –
Right-click somewhere within the Test Items page and choose Enable\Disable > Toggle All from the context menu.
In TestComplete, you can mark test items in your project as test cases to collect information on their results to a Summary report.
To mark a test item as a test case, select or clear the Test Case check box of the test item.
To mark (or unmark) several test items at once:
Select the needed test items. You can use Ctrl- and Shift-clicks for multiselection.
Right-click the selection, click Mark/Unmark Test Case, and then click Mark Selected or Unmark Selected.
To mark (or unmark) all test items as test cases:
Right-click anywhere on the Test Items page.
Click Mark/Unmark Test case and then click Mark All or Unmark All.
To toggle all test cases and test items:
Right-click anywhere on the Test Items page.
Click Mark/Unmark Test case and then click Toggle All.
Mark the needed test item as a test case.
Click in the Link to external test case column.
If your TestComplete project is not bound to an external test management system yet, select either Zephyr for Jira or Azure DevOps and connect to it in the resulting wizard.
Before linking your TestComplete project to an Azure DevOps team project, make sure to add the TestComplete project to your team project’s repository.
Select an external test case to which you want to bind your TestComplete test case.
If you are connecting to Zephyr for Jira:
In the Link to external test case wizard, select the external test case you want to bind to your TestComplete test case.
– or –
Type the identifier of the external test case manually. Use the following format:
If you are connecting to Azure DevOps:
On the Edit test case associations page of the wizard, click the ellipsis button and select the needed test case in the resulting Choose Test Case dialog. Then click Add association.
If needed, repeat the step to link the TestComplete test case with several test cases of the test plan.
Select a test item linked to an external test case.
If the item is bound to a Zephyr test case, clear the Link to external test case column.
If the item is bound to an Azure DevOps test case:
To remove a single link:
Click the ellipsis button in the Link to external test case column.
In the resulting Associate with Azure DevOps / TFS Test Cases wizard, in the Existing associations table, select the needed test case.
Click Remove and then click Finish to apply the changes.
To remove all the links at once and unbind your TestComplete project from the Azure DevOps / TFS team project:
Switch to the Properties page of your project.
Select Azure DevOps in the tree on the left.
Click Unbind from Azure DevOps / TFS Project.
When you execute your test project, TestComplete automatically runs all the enabled test items that can be managed on the Test Items page. Besides, you can run the desired test items manually in one of the following ways:
Select the desired test item or group of test items and click Run Focused Item on the toolbar.
– or –
Right-click the test item or group and select Run Focused Item from the context menu.
TestComplete will run the selected test item or group along with all child items.
|Note:||Only enabled test items can be run.|
You can run test items not only from TestComplete UI. For information about all possible ways of running test items (from the command line, from Jenkins and so one), see information in the Running Test Items section.
Use the Move Up, Move Down, Indent Item and Outdent Item buttons on the toolbar.
– or –
Drag the desired item to the desired location within the tree. When you drop the dragged item, TestComplete will place it after the test item that is under the mouse cursor.
|Note:||To move an existing test item to a group, press Alt and drag the test item to the group.|
Select the test item and click the Jump To Test button on the toolbar.
– or –
Right-click the test item and select Jump To Test from the context menu.
TestComplete will open the corresponding editor in the Workspace panel. If the test item relates to a certain scripting routine, TestComplete will navigate to the beginning of the routine in the Code Editor.
To expand all test items on the Test Items page, right-click somewhere within the Test Items page and select Expand All from the context menu. Alternatively, use the Ctrl+Alt+A shortcut.
To collapse all test items on the Test Items page, right-click somewhere within the Test Items page and select Collapse All from the context menu. Alternatively, use the Ctrl+Alt+C shortcut.
Select the desired node in the list (you can use Ctrl- or Shift-click for multiselection).
Press DEL, or click Delete on the Standard toolbar, or choose Delete from the context menu.
To save changes made to the project’s test items, select File > Save from the TestComplete main menu.
To cancel any changes, close the editor and answer No when TestComplete asks you whether to save the changes.
This section describes how you can run test items other than manually from the Test Items page (see above).
From the command line.
By default, when you run a project from the command line, the project executes all enabled test items specified on its Test Items page. In addition, you can use the /test (/t) command-line argument to explicitly specify test items you want to run.
|Note:||TestComplete will run only the enabled test items, it will not run the disabled items.|
For example, the following command runs TestComplete, loads the specified project suite (MySuite.pjs), and commands TestComplete to run the ProjectTestItem1 test item of the MyProj project:
TestComplete.exe "C:\My Projects\MySuite.pjs" /r /p:MyProj /t:ProjectTestItem1
As part of a CrossBrowserTesting run.
Add the needed test items to the CrossBrowserTesting manager, specify the environments where you want to run the test items, and run them either manually from the manager or automatically from the command line. To learn more about running tests in CrossBrowserTesting environments, see Running Tests in CrossBrowserTesting Environments.
As part of an automated build and test process managed by Jenkins.
You can add the TestComplete Test build step to your build process in Jenkins and configure it to run the needed test item. See Integration With Jenkins.
From Visual Studio.
If you have TestComplete 14 Integration Package installed in your Visual Studio, you can add TestComplete 14 Test items to your Visual Studio test projects, specify a TestComplete project’s test items which these items should run, and run them either directly from Visual Studio, or as part of a build or release pipeline. To learn more, see Integration With Azure DevOps and Team Foundation Server via TestComplete Test Adapter.
From an external application via COM.
TestComplete 32-bit executable is located in the <TestComplete>\Bin folder.
TestComplete 64-bit executable is located in the <TestComplete>\x64\Bin folder.