VersionOne Integration with Microsoft Team Foundation Server 2010

Introduction

Contents

Description

VersionOne's integration with Microsoft Team Foundation Server (V1TFS) provides your organization with visibility into change while freeing the development team to focus on deliverable. This integration is comprised of two parts: The TFS Listener and the VersionOne Check-in Policy.

The TFS Listener is responsible for responding to check-in and build events from TFS. For each qualifying check-in event the listener creates a "ChangeSet" in VersionOne, providing the team visibility into the code changes for a story or defect. This visibility can be useful when tracking down defects or performing code reviews. For each qualifying build event, the listener creates a "BuildRun" in VersionOne. If possible BuildRuns are associated with stories and/or defect in VersionOne , providing the organization visibility into build contents. This visibility is useful when selecting a build to release, identifying problem builds, or generating release notes.

In order for the Listener to create associations in VersionOne, the check-in comment must include a VersionOne story or defect ID, such as "S-01454". The VersionOne Check-in Policy ensures that this requirement is met. When this policy is enabled for a TFS project, each comments is scanned for a VersionOne ID. If not found, the Policy fails and prompts the user to select an ID from a dialog box. The user may select from items they own in active iterations, or from all items in active iterations.

System Requirements

Installation

Before using the VersionOne VSTS integration you must perform the following actions

  1. Install the TFS Listener
  2. Configure the TFS Listener
  3. Install the VersionOne Check-in policy
  4. Enable the VersionOne Check-in policy for a TFS Project
  5. Configure VersionOne Build Integration
  6. Verify Everything Works

Install TFS Listener

The VersionOne TFS Listener is a WebService that must be installed on a machine that has access to your VersionOne Server and your Team Foundation Server. It is recommended that you install the Listener on the Team Foundation Server.

To install the TFS Listener, execute VersionOne.TFS.Listener.Installer.msi on the appropriate machine and follow the steps in the installation wizard. You can verify the listener by typing the following URL into your browser:
http://[machine]:[port]/Service.svc

Replace [machine] with the name of the machine hosting the service [port] with the TCP port number that you provided in the installer.

For instance, if the machine hosting your TFS Server is called "TFS2010" and you specified port 9090 in the install, your URL would be:
http://tfs2010:9090/Service.svc

You should see a page similar to the following:

Top

Configure the TFS Listener

In order for the TFS Listener to work it must know which VersionOne instance to use when creating assets and making associations and which TFS instance to use for listening to events. Configuring the TFS Listener is accomplished using the TFS Listener Configuration utility. This utility is installed as part of the TFS Listener installation. If you need to reconfigure the TFS Listener at a later date, this utility is available from the Start menu under Programs | VersionOne TFS Listener.

The utility has 3 tabs

  1. VersionOne Server

    This tab allows you to to configure VersionOne connectivity. All of these parameters are required.

  2. TFS Server

    This tab allows you to subscribe to TFS Events. All of these parameters are required

  3. Advanced

    This tab allows you to configure the regular expression used to match VersionOne IDs in Check-in comments and enable a debug log. This configuration is optional since we set the default value to a working expression. We do not recommend you change this unless necessary.

Top

Install the VersionOne Check-in policy

The VersionOne Check-in Policy ensures that each TFS Check-in contains a VersionOne identifier. This policy must be installed on each machine running Visual Studio 2010. To install the VersionOne Check-in policy, execute VersionOne.TFSPolicy.Installer.vsix on the client machine.

Top

Enable the VersionOne Check-in policy for a TFS Project

In order to be considered when performing a check-in, the VersionOne TFS Check-in policy must be enabled on a TFS project. Perform the following steps to enable the Check-in policy on a TFS Project

  1. Open Visual Studio 2010
  2. Open the Team Explorer
  3. Right click on the desired project
  4. Select "Team Project Settings"
  5. Select "Source Control..."
  6. Select the "Check-in Policy" tab
  7. Click "Add"
  8. Select the "VersionOne Policy"
  9. Click Ok to close the "Add Check-in Policy" dialog
  10. Click Ok to close the "Source Control Settings" dialog

Top

Configure VersionOne Build Integration

In order to access TFS Build Runs in VersionOne you must configure the VersionOne application. The following steps describe how to enable build integration, create a build project, and assign that project to a project containing stories and defects.

If you are using Team Edition, you need to manually create the Build Project. Instructions for doing this are available on the VersionOne Community Site.

  1. Log into the VersionOne application as admin
  2. Navigate to the Admin | Configuration | System page.
  3. Check the "Enable Build Integration" checkbox and click the Apply button.
  4. Navigate to the Admin | Projects | Build Project page
  5. Click Add to add a new Build Project
  6. Specify the following
    1. Name: this is how the Build Project will be known to VersionOne users
    2. Reference: this is the Build Project is known to TFS
  7. Click Ok to save the new Build Project
  8. Navigate to the Admin | Projects | Projects page
  9. Click Edit on the row for the project you want associated with a Build Project
  10. Using the "Build Projects" dropdown add the appropriate Build Project.
  11. Click Ok to accept the changes
  12. Logout

Top

Verify Everything Works

Perform the following steps to verify the integration:

  1. Open a Visual Studio project that is in the selected TFS project
  2. Open a file and make a change (for instance, add a comment)
  3. Save the change
  4. Check-in the change
  5. Type a comment, but do not provide a VersionOne identifier
  6. Click Check In

    You should be presented with the following dialog

  7. Provide the VersionOne URL and your credentials

    You may want to wait until after testing to cache credentials.

  8. Click OK

    You should now be presented with the following dialog, populated with information from your VersionOne Server

  9. Select an Item in VersionOne
  10. Click OK

    Once the check-in completes, launch your browser and navigate to VersionOne. Login and locate the item you chose to associate with the check-in. Click on the item to open the details page. You should now see data in the following grids: Changesets, Last Affected Build Runs, and Affected Build Runs.

Top

Troubleshooting tips

Technology

The V1 TFS integration is built in C# using Visual Studio. The TFS Listener Installer is build using WIX. Source code is available on the VersionOne Community Site