Deep copy of Test Cases to a TFS Team Project in another Team Project Collection

July 22, 2015

A few days ago I got stuck in a project to migrate a set of test cases from an “old” Team Project to another (new) Team Project in another Team Project Collection (TFS 2013 Update 4 environment). Via the TFS API I used the work item Copy method to perform a deep copy [including links/attachments] with the WorkItemCopyFlags set to CopyFiles.

ITestCase testCase = <MyTestCase>;
WorkItem wiCopy = testCase.WorkItem.Copy(<TargetProjectWorkItemType>, WorkItemCopyFlags.CopyFiles);
wiCopy.Save();

This always worked when copying test cases to a Team Project in the same Team Project Collection (TPC) as the original Team Project, but copying the test cases to a Team Project in another TPC always caused an error:

TF237136: File attachment was not found on attachment server.

I expected this to work, but after I verified that the MTMCopyTool also generated the same error when copying test cases across Team Projects, I decided to search for a workaround … downloading and uploading the attachments as after-processing.

DownloadUploadAttachments

Not perfect, but good enough to keep going and moving all attachments to the other Team Project in the other Team Project Collection.


Reporting Services issues after migration to TFS 2015 RC2 (from TFS 2010)

July 10, 2015

Yesterday, I blogged about the migration activities to get to TFS 2015 RC2, but I was still stuck at an error during new Team Project creation.

TeamProjectFailure

Looking into the logs it looked like there was some kind of issue during the upload of the first Reporting Services report “Bug Status” (part of the latest TFS 2015 Agile process template).

TeamProjectFailure-ReportUpload

First I thought there was something wrong with permissions on the Reporting Services site because I also applied a certificate to offer accessibility via https, but that wasn’t it. All seemed to be setup correctly. A sign to look further into the details of the Bug Status .rdl report definition and why it couldn’t be correctly uploaded to the Reporting Services site. After downloading the process template from the Team Project Collection and opening the report with notepad, I knew I was getting closer to the root cause.

DataSourceIssue

As shown in the picture above, the (default TFS 2015) Data Source mentioned in the report definition did not exist in the Report Server database after the migration from TFS 2010 SP1. In the TFS 2010 timeframe, all report defintions were linked to a “2010” Data Source.

Instead of renaming the existing Data Sources (that would break the existing reports, created from a TFS 2010 Team Project), I duplicated the entries to provide extra Data Sources with the expected names for usage with TFS 2015.

Issues resolved. Back on track!


Upgrading TFS 2010 SP1 to TFS 2015 RC2

July 9, 2015

Today I got the opportunity to upgrade a customer from TFS 2010 SP1 to TFS 2015. As blogged by Brian Harry a few days ago, the RTM release of TFS 2015 (not Visual Studio 2015!) is delayed (for a good reason!) and in order to further test the overall migration/upgrade process a new RC2 release has been made available (with go-live license). That’s the build I used today to upgrade from TFS 2010 SP1. The official installation guide is not yet available, so here are some tips to get you started in the right direction … At the customer I got 2 new servers at my disposal with a clean Windows Server 2012 R2 OS. The first server is used for the TFS Application and TFS Data Tier (Single Server Topology). The second one will be used as the TFS Build Server.

Prerequisites

Installing SQL Server 2014 Standard Edition

Before starting the installation of SQL Server 2014, I enabled the .NET 3.5 feature on Windows Server 2012 R2. OSFeature

Required SQL Server features:

SQL2014-FeatureSelection

I always recommend to use dedicated domain service accounts for running SQL Server. In this case I decided to reuse the <TFSSERVICE> account. Note that all services are set to start automatically. ServiceAccountsForSQL

SQL2014-InstallationResult

After successful installation of SQL Server 2014 I started the backup procedure on the old TFS 2010 environment and I copied all SQL .bak files to the new server for restoring all TFS related databases to the SQL Server 2014 instance. SQLDatabases

Configuration of SQL 2014 Reporting Services

Start-RS

Link to the existing restored “ReportServer” SQL Server database.

SetRSDatabase

RS-ExistingDB

RS-SelectReportServerDatabase

RS-Summary

Restore the SQL Server Reporting Services Encryption key.

RS-RestoreEncryptionKey

RS-RestoreEncryptionKey2

Run/Apply the web service and the report manager service.

RS-Webservice

RS-ReportManager

Remove the “old” server from the scale-out deployment configuration [https://intovsts.net/2014/07/14/tfs-migration-upgrade-scale-out-reporting-services-issues/] Test the Report Server website …

RS-Running

Installation TFS 2015 RC2

InstallTFS2015

trialLicense

The trial license is valid for 90 days and can be extended for 30 days. At this moment, there are no product keys available for the RC2 release.

Wizard-Upgrade

Wizard-Upgrade2

Wizard-Upgrade3

Wizard-Upgrade4

No Build Configuration yet.

Wizard-Upgrade5

Wizard-Upgrade6

Wizard-Upgrade7

Wizard-Upgrade8

Wizard-Upgrade9

Wizard-Upgrade10

No SharePoint link (yet).

Wizard-Upgrade11

Verification …

Wizard-Upgrade-Verification

Successful upgrade!

Upgrade-Success

Once the TFS 2015 RTM release becomes available, it’s only a minor upgrade to move to the official RTM bits. Interested in the release notes for TFS 2015? Check out the official news update, posted in April 2015.