Integration With Microsoft Team Foundation Version Control

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

Team Foundation Version Control (TFVC) is a centralized version control system provided by Microsoft as part of Azure DevOps Services, Azure DevOps Server and Team Foundation Server. You can use Team Foundation Version Control to store and manage your TestComplete projects.

About Team Foundation Version Control integration

You can integrate TestComplete with Team Foundation Version Control and work with the repository directly from the TestComplete user interface. Without leaving the TestComplete IDE, you can add project files to your team project repository, check in changes, get files from the repository, and so on. You can perform these actions for individual project items and their child elements, not only for project and project suite files.

Requirements

Before you start working with Team Foundation Version Control from TestComplete, you need to prepare your computer and TestComplete:

  1. Install Microsoft Team Explorer on your computer. TestComplete uses Team Explorer to work with team projects in Azure DevOps Services, Azure DevOps Server or Team Foundation Server.

  2. In Team Explorer, connect to your repository and create and configure a workspace to map your team projects to your local folders.

  3. Make sure the Team Foundation Version Control Plugin is installed and enabled in TestComplete (it is installed and enabled by default). You can find the plugin in the Common group of the File > Install Extensions dialog.

  4. Set the TestComplete current source control provider to Team Foundation Version Control Plugin.

For complete information on how to enable Team Foundation Version Control integration in TestComplete, see Requirements and Prerequisites.

Working with Team Foundation Version Control

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

  • The Source Control submenu of the Project Explorer’s context menu.

  • The File > Source Control menu of TestComplete.

  • The Source Control toolbar.

    Using the toolbar is, perhaps, the most convenient way to work with Team Foundation Version Control 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 TFVC integration enabled.

Click the image to enlarge it.

These menus and the toolbar contain the same items.

Note: 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 Team Foundation Version Control integration is enabled, the Source Control menus and the toolbar contain the following items:

Item Description
Open From Team Foundation Server Gets a project (or project suite) from your team project repository and opens it in TestComplete.
Add to Team Foundation Server Adds the current projects (or project suite) to your team project in Azure DevOps Services, or on Azure DevOps Server or Team Foundation Server.
Unbind from Team Foundation Server Unbinds your project (or project suite) from the repository and deletes it from your team project.
Get Specific Version Gets a specified version of your project suite, project, or project item from your team project repository.
Check In Checks in pending changes in your project suite, project, or project items to your team project repository.
Check Out for Edit Checks out your entire project, or project suite, or an individual project item from your team project repository so that you can edit the project suite, project, or item.
Undo Pending Changes Discards pending changes in your project suite, or project, or individual project item.
Compare Compares two versions of the same file in your project or project suite.
View History Shows the version history of the selected project item, project, or project suite.
Properties Shows properties of the selected project item, project ,or project suite.
Refresh Status Refreshes the status of files in your project or project suite.

When your project or project suite is bound to your team project repository, the project item icons in the Project Explorer panel include small images that indicate the status of files in the server.

Team Foundation Version Control status icons in Project Explorer

Integration with Team Explorer

TestComplete calls Team Explorer dialogs to work with the Team Foundation Version Control repository.

Integrating TestComplete with TFVC

Click the image to enlarge it.

To learn how to work with Team Explorer dialogs, please see the Team Foundation Version Control documentation. The online version is available in the MSDN library:

docs.microsoft.com/en-us/azure/devops/repos/tfvc/overview

Common Tasks

Known issues and limitations

  • If you delete a project or project suite bound to your TFVC repository from your local computer without unbinding the project or project suite first, and then re-create the same project or project suite in the same folder on your computer, Team Foundation Version Control may fail to recognize the project or its elements as bound to the repository or will recognize them incorrectly. To resolve this issue, unbind your project or project suite from your repository and then bind it again.

  • Team Foundation Version Control does not add the following images to your repository automatically:

    When you submit your changes, those images are excluded from check-ins by default. To add the images to the Team Foundation Version Control repository, you need to move them from the list of excluded changes to the list of included changes manually on the Pending Changes page of the Microsoft Team Explorer. To learn more, see docs.microsoft.com/en-us/vsts/repos/tfvc/check-your-work-team-codebase in the MSDN Library.

  • Storing a large number of Test Visualizer images in a source control system is not recommended, because 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.

  • If Visual Studio 2012 or earlier is installed on your computer, you may get the following error when connecting to your Team Foundation Version Control repository:

    The program can't start because MSVCR120.dll is missing from your computer. Try reinstalling the program to fix this problem.

    To resolve the problem, install Visual C++ Redistributable Packages for Visual Studio 2013 on your computer. You can download the packages from the Microsoft web site:

    Visual C++ Redistributable Packages for Visual Studio 2013

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