Integration With Git

Applies to TestComplete 15.31, last modified on March 17, 2022

Git is a free software version control system. You can use Git to store and manage your TestComplete projects. You can work with local repositories (located on your machine), as well as with remote repositories (located in a network).

About Git integration

You can integrate TestComplete with Git and work with repositories directly from the TestComplete user interface. Without leaving the TestComplete IDE, you can add project files to the repository, commit changes, pull changes from and push them to repositories, and so on. You can perform these actions for individual project items and their child elements, not only for project and project suite files.

TestComplete includes special built-in dialogs that simplify performing various commands on files and repositories, such as viewing the file history, creating and merging branches, and so on.

Requirements

Before you start working with Git from TestComplete, you need to prepare your computer and prepare TestComplete:

  1. Install Git for Windows on your computer. To work with the Git source control system, TestComplete uses the Git command-line utility (git.exe).

  2. Check whether the TestComplete Git Plugin is installed (this plugin provides the Git-specific menu commands, dialogs, and wizards).

  3. Switch your current source control provider to Git Plugin and specify a valid path to git.exe in the Source Control Options dialog.

For complete information on preparatory actions, see Requirements and Prerequisites.

Working with Git

To work with the source control, you can use the following UI elements in TestComplete:

– or –

  • Items of the File > Source Control menu of TestComplete.

– or –

  • Items of the Source Control toolbar.

    Using the toolbar is, perhaps, the most convenient way to work with Git repositories. By default, the toolbar is hidden. To make it visible, right-click the main menu area and select Source Control from the subsequent context menu. See also Customizing Toolbars and Menus.

Source Control menu and Source Control toolbar with Git integration enabled.
Source Control menu and Source Control toolbar with Git integration enabled.

These menus and the toolbar hold the same items. Note that the context menu of some items in the Project Explorer does not include the Source Control submenu. This means that the item is not stored in a file, so it cannot be added to a source control system as an individual instance. Such items are typically added as part of their parent items.

When Git integration is enabled, the Source Control menus and the toolbar contain the following items:

Item Description
Clone Repository Clones an existing repository that stores a project suite (or project) and then tries to open that project suite (project) in TestComplete.
Create Repository Creates a local Git repository and adds the current project suite or project to this repository.
Delete Repository Unbinds projects from the source control and deletes the repository.
Show Log Opens the history of changes made to the repository.
Branches Opens the Branches dialog that lists local and remote branches.
Commit Submits your latest changes to the repository.
Reset Reverts all local changes.
Fetch Fetches data about changes from the remote repository.
Pull Gets changes from the remote repository and merges them to your local repository.
Push Uploads your changes to the remote repository.
Refresh Status Refreshes the status of items in the source control.
Settings Opens the Git Repository Settings dialog.

When the project suite or one of its projects is bound to a source code control system, the project item icons in the Project Explorer panel include small images that indicate the source control status of the files. See Source Control File Status Icons for detailed description of each icon:

Status icons in Project Explorer
Status icons in the Project Explorer
Note: When you add new items to your project or edit existing items, TestComplete updates the project items status only when you save the changes you have made. This happens because TestComplete tracks the status of corresponding files, and the file status in the repository updates only when you save the changes. Until the changes are unsaved, the file status is unchanged.

That is why, for example, when you add a new keyword test or script unit to your project, the test or unit is marked as new, but the parent KeywordTests and Script items are not marked as modified until you save the changes.

Integration with TortoiseGit client

You can enhance your interaction with Git by enabling integration between TestComplete and TortoiseGit - a GUI client for Windows. In this case, TestComplete will use TortoiseGit dialogs to perform some of source control operations. This gives you even more abilities to work with Git:

Items of the Source Control menu with TortoiseGit integration enabled.
Items of the Source Control menu with TortoiseGit integration enabled.

Integration with the TortoiseGit client is the preferred way to work with Git from TestComplete IDE. To learn more about TestComplete integration with TortoiseGit and the way to configure the integration, see Working With TortoiseGit Client.

Common tasks

The topics below describe how you can perform the most common tasks over projects and project suites bound to a Git repository directly from TestComplete.

Known issues and limitations

  • TestComplete cannot work with bare Git repositories.

  • Currently, TestComplete integration with Git does not provide support for submodules. It will ignore submodule changes when pulling changesets from repositories. As a workaround, you can navigate to your submodules and add and update files there manually.

  • TestComplete does not support non-latin characters in names of branches, tags, commit messages and other text labels. Working with branches, tags and commit messages that contain non-latin characters may cause errors. As a workaround, we recommend that you enable integration with the TortoiseGit client. The dialogs of TortoiseGit have full support for non-latin characters.

  • TestComplete script files can have the ANSI, multibyte (UTF-8) or Unicode (UTF-16) format. The native Git client does not support Unicode files and treats them as binary files. This may hamper the comparison and merging of script files in the Unicode format. To resolve the problem, you can do either of the following:

    • Change the character encoding format of script units in your project to UTF-8 or ANSI. For more information on this, see Units Encoding.
    • Use the TortoiseGit client. This client supports Unicode files and treats them as text files.
  • Storing a large number of Test Visualizer images in a source control system is not recommended as this can reduce performance of the check in and check out operations on the test project. To avoid performance issues, remove unnecessary Visualizer images from your source control-bound test project. You can also disable the Bind Visualizer frames to SCC option to command TestComplete not to add (and check in) Visualizer files to the source control. For details, see the Visualizer Data and Source Control Systems section of the Sharing Visualizer Frames topic.

Video

To learn more about integrating TestComplete tests into your development, testing, and release workflow, you can take a video course in our SmartBear Academy:

smartbear.com/academy/testcomplete/testcomplete-qa-architect

See Also

Integration With Source Control Systems
Migrating From Legacy SCC API Providers

Highlight search results