Running TCUnit Tests

Applies to TestComplete 15.47, last modified on January 20, 2023

In TestComplete, you can create unit tests by calling internal methods of your tested application.

In the TCUnitTest editor, you view and configure properties of TestComplete unit tests. Here is a sample image of the editor:

Requirements
  • TestComplete must have the Desktop module enabled.

  • Your application must be compiled as Open.

1. Prepare Your Test Application
2. Configure Your TestComplete Project
3. Configure the TCUnit Item to Run Needed Test Methods
  • In the Process text box, enter the process name of the open application that contains the unit test code. You can also click the ellipsis button and select the needed process in the Select Process dialog.

  • In the Mode section, you select the way TestComplete must work with unit tests:

    • To run all test methods of unit test classes defined in your application, select Automatically load list of tests and run all tests.

    • To run only routines selected on the Tests list, select Run selected tests only.

    • To run all test methods defined in your application except for the methods selected on the Tests list, select Automatically load list of tests and run without selected tests.

  • In the Tests list, select test methods you want to run.

    To load the unit testing information from the application, click Load. To add routines manually, click Add Test and type the desired routine name. Click Add Group to add a group of tests. The group node also can be a test method to run.

    To remove a test from the list, select it and click Remove. To remove all tests from the list, click Clear.

4. Run the TCUnit Test Item

Run the TCUnit test item in TestComplete. For information on how to run unit test items, see Running Unit Tests.

After the test run is over, view the test results.

See Also

TestComplete Unit Tests

Highlight search results