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.
Test item properties
The Test Items page shows the project’s test items in the order they will be run. A test item can be:
- A keyword test
- A script routine
- A low-level procedure
- A network suite, or its job or task
- A BDD scenario or several scenarios
- A unit test or a Selenium test
- A ReadyAPI functional or security test
- A tag or tag expression specifying one or several tests (keyword tests, script routines, and BDD scenarios) to run
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).
Column | Description | ||
---|---|---|---|
Name | The test item name. | ||
Test case | Marks the test item as a test case. This item will be included in the Summary report.
Notes:
|
||
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 OnTimeout event. You can create a handler for this event to stop the current test item and proceed to the next one. See Stopping Tests on Timeout.
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. |
||
On error |
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 | If your TestComplete project is bound to an external test management system (for instance Zephyr for Jira or Azure DevOps), specifies the external test cases to which your test item is linked. 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: zfj://“your_zephyr_test_case_key” Notes:
|
||
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.
Working with the page
Copy an existing test item or group
Include or exclude test items from a test run
Mark a test item as a test case
Link a test item to a test case in an external test management system
Change the run order of test items
Run test items
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.
Use the
Integration.RunProjectTestItem
method to run a test item of a project. To learn more about running tests via COM, see Working With TestComplete 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.
See Also
Projects in TestComplete
Tests, Test Items, and Test Cases
Running, Pausing and Stopping Automated Tests
Stopping Tests on Timeout