March 31, 2010

TFS Integration: Attach2TestTrack

Helix ALM
Attach2TestTrack allows Team Foundation Server (TFS) users to associate files in the Team Explorer's Source Code view with defect(s) in TestTrack Pro.


The plugin works with Team Foundation Server 2008 and TestTrack 2010. These were the versions used in development and testing. This may work with other versions but it has not been verified. Forward compatibility is more likely than backwards compatibility. After installing the plugin, TFS users will be able to see an "Attach to TestTrack..." menu appear in the context menu in the Source Control Explorer.

Selecting this option will prompt the user to log in to TestTrack.

The following information is needed: SOAP URL: The URL of the TestTrack SOAP CGI. User Name: Username to use to log in to TestTrack. This user must have permission to log in via SOAP, which is set in the security group. Password: Password for the above user. Project: TestTrack project to log into and show defects. This dropdown is populated when the user clicks on it. It uses the first three fields to determine the projects available to the user. There are two options provided in the dialog:
  • Save Connection Information: Will save all information except for the password to an XML file that will stored in the same directory as the devenv.exe file.
  • Remember Password (clear text): Will save all the information including the password in an XML file in plain text (no encryption). The XML file is stored int he same directory as the devenv.exe file.
Upon successful login, the login window dissapears. The TestTrack defect list window comes next. For performance reasons, it does not load defects when it opens. The user must select a filter first and then retrieve the defects.

The user may select one or more defects. Once the selections are made, clicking on the "Attach" button will update the defect in TestTrack Pro. The Source Code tab for each defect will now have a reference to the file in TFS.

Locked Records: If the selected defect is open for edit somewhere else, it will be locked and therefore not editable. This is true even if the same user is the one that has the defect open. If multiple defects are selected, only the locked defect will not be updated. All other defects will be updated regardless of the order in which they were selected. This plug in does not check in files: This plug in only updates TestTrack, it does not check in files in TFS nor doed it update anything else in TFS. This plug in maybe used to create another plug in that will also allow check in for files for greater tracebility.

Configuration File

When the connection information on the login window is saved, it is saved to a configuration file called "TTConfig.xml". This file gets saved to the "current directory", which by default is the directory where the Visual Studio (devenv.exe) executable is located. The file may also contain information about columns to display in the defect list window. Following is a sample config file that is saving all connection information (including password) and also has three extra columns configured.
<?xml version="1.0"?>
  <Project>TestTrack ALM</Project>
  <Column>Currently Assigned To</Column>

Column Configuration

The defect list window will contain three columns by default:
  • Number
  • Summary
  • Status
The display of these columns can not be changed. However, additional columns for display can be configured. Column names can be added to the configuration file. Enclose the column name with <column> tags. Note that not all columns may be displayed. If you specify a column, but you do not have permission to see the field, the column will not be displayed.

Questions, Comments, Bugs?

If you have any questions, comments or would like to report a bug with this plugin, feel free to shoot me an email. Keep in mind that this plug in is provide by me and not supported by Seapine.


The plugin is available here. The zip file contains two files: Attach2TestTrack.AddIn Attach2TestTrack.dll Drop these files in the ..My DocumentsVisual Studio 2008Addins