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 and 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. Any project item that can be run can be a test item: a keyword test, a script routine, a low-level procedure, a unit test, and so on.
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: a keyword test, script routine, BDD scenario or feature file, low-level procedure, network suite and so on. 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||Parameter values for the test (only for keyword tests and script routines). To specify parameter values, press the ellipsis button and use the resulting Test Parameters dialog. You can specify 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 the external test to which your test item is bound if your TestComplete project is bound to an external test management system (for instance, Zephyr for Jira).
You can click the ellipsis button and select the needed Zephyr test case in the resulting wizard. If your TestComplete project is not bound to a Jira project yet, configure the connection in the resulting wizard, and then select the needed test case.
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:
To learn more about automating Zephyr tests with TestComplete, see Integration With Zephyr for Jira.
|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.
|Note:||If you drag and drop a script unit, TestComplete will add test items corresponding to all of the script routines contained in that unit.|
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 and choose the desired test using the Select Test dialog.
To modify the parameter values for the test:
Click the ellipsis button within the Parameters cell and use the resulting Test Parameters dialog.
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, and then click the ellipsis button in the column.
If your TestComplete project is not bound to an external test management system yet, bind it in the resulting Link to external test case wizard.
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. For instance, to bind a test case to a Zephyr test case, use the following format:
To remove a link between a TestComplete test case and an external test case, clear the Link to external test case column.
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.
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.