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).
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.
Before you start working with Git from TestComplete, you need to prepare your computer and prepare TestComplete:
Install Git for Windows on your computer. To work with the Git source control system, TestComplete uses the Git command-line utility (git.exe).
Check whether the TestComplete Git Plugin is installed (this plugin provides the Git-specific menu commands, dialogs, and wizards).
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.
To work with the source control, you can use the following UI elements in TestComplete:
Items of the Source Control submenu of the Project Explorer’s context menu.
— 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.
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:
|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:
|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.
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:
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.
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.
TestComplete cannot work with bare Git repositories.
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:
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.