Publication of Test Results to TFS 2008

July 16, 2010

Lately I’ve been struggling with some weird behavior during a Team Build (TFS 2008). The build executed also a set of Unit Tests which passed, but during the publication step of the test results to Team Foundation Server, the operation failed time after time.

BuildFailed

PublishFailed

I couldn’t find any additional information (eventlog, TFS Log, …) about the root cause of this failure, but while limiting the test methods for the test run I bumped into a test method which name consisted of 461 characters!

Apparently there’s a hard limit of 256 characters for the test method names that are published to the TFS data warehouse.


Code Coverage results with Team Builds (TFS2008)

January 20, 2010

From Wikipedia:

Code coverage is a measure used in software testing. It describes the degree to which the source code of a program has been tested.

I won’t start the discussion what’s a good percentage for code coverage and why you should care or not, but let me just say that Code Coverage results may be very welcome while testing your applications. We all know that 100% coverage for a specific application doesn’t mean that your application is fail-proof and it won’t tell you how good your unit tests are. But it may give you a nice indication of the reach of your unit tests and those results should always be combined with other metrics of your code/tests.

Recently I noticed a strange thing when setting up unit tests (including code coverage) in Team Builds for TFS2008. To run unit tests after the compilation process in the build, you basically have two options.

  1. specify test list(s) in the vsmdi file

    option1vsmdi 

  2. specify test containers  

     option2testcontainer

 

Now the tricky part about code coverage results, considering you have a solution with unit tests where you enabled code coverage in the testrunconfig file.

testrunconfig_codecoverage

Setting up a Team Build with activating unit tests via a vsmdi file will give you the requested Code Coverage results.

buildresult_option1

On the other hand, setting up a Team Build (same solution) with enabling unit tests via a test container won’t give you the desired Code Coverage results.

buildresult_option2

Why is that?! Well, Code Coverage settings are contained in the testrunconfig file and the thing is that the vsmdi file contains a reference to this testrunconfig file (open up notepad to verify), while the test containers don’t have a link with any testrunconfig file. If you want to include a testrunconfig file to your build that will be used during the execution of the unit tests, you need to specify the RunConfigFile property in the TfsBuild.proj file so that the Code Coverage settings are picked up during the run of the unit tests.

option2_solution

Result:

option2_result


Deleted Team Projects still visible in Source Control Explorer

November 25, 2009

Today I bumped into a solution for deleting deleted Team Projects (yip, that’s right: deleting Team Projects that should have been already deleted). A while ago we noticed that Team Projects in TFS2008 SP1 that were deleted with TFSDeleteProject.exe were still visible in the Source Control Explorer and re-running TFSDeleteProject.exe for the same Team Projects resulted in an error message that the Team Project could not be found on the Team Foundation Server.

But due to this entry in the TFS forum I was finally able to remove the Team Projects from Source Control Explorer as well.

Solution:

  • Create new Team Project with exactly the same name as the Team Project that wasn’t completely deleted and specify the option to not create the version control folder.
  • After the Team Project Creation wizard finishes, you need to run TFSDeleteProject.exe for the newly created Team Project.

No sign anymore of the deleted Team Projects in Version Control! Sounds logical?!


ALM / TFS Books and Documentation

November 12, 2009

This week at TechEd in Berlin, Hans asked for some interesting ALM / TFS books. This is a quick random list of the latest books I know about:

Feel free to add some more books to the list!

Note that there is also a paperback version available of the TFS Guide: Team Development with Visual Studio Team Foundation Server, written by Microsoft Patterns & Practices. The online version can be found at CodePlex: TFS Guide.

If you are looking for the online MSDN documentation, point your favorite browser to the Team Foundation Server Developer Center.

There will also come some new books on VS2010: Professional Visual Studio 2010 Team System: with Team Foundation Server 2010, but I think that the name of the book will still change. Martin Woodward also mentioned that he’s writing on a new Team Build book for VS2010 and I’m sure that there are others under construction. To be continued!


Feedback VS2010 Beta2?

November 6, 2009

So, you are playing around with VS2010/TFS2010 and you have some remarks, suggestions, bugs, … Please go the Microsoft Connect site for product feedback and bug reporting.

Today I filed a suggestion for the next release of Team Foundation Server: Build Definition History. Unfortunately it’s still not possible to view history of changes made to the Build Defintion: “Drop Location”, “Build Agent”, “Trigger”, … On the Microsoft Connect site, you can easily look up other wanted featured and vote for them … but first vote for my suggestion!

Since a few weeks, there’s also a feedback survey running on Microsoft Visual Studio 2010 and the .NET Framework 4 Beta 2. If you care about the product and want your voice heard, please take some minutes to complete this online survey!


VSTS/TFS Customer Testimonial – Adam Software

June 22, 2009

 
About a year ago I performed a VSTS/TFS assignment for Adam Software, a global software vendor of marketing platform technologies that provide the ability to manage, structure and deliver media between people, processes and systems. This assignment was really fun to do and the customer was really pleased with the result. A few weeks ago, a Microsoft case study was published to put Visual Studio Team System and Team Foundation Server in the spotlight.

In case you still wonder : setting up a robust and reliable enterprise software development environment with Team Foundation Server may be a big investment, but it always pays off. Not only financially! Your development team will also be working with the best tools and processes to do their job. In the long run you might even attract or repel developers just because of the type of development environment you provide as an organisation! For those who worked already in a TFS environment with Version Control, Work Item Tracking and Automated Builds … would you want to go back in time and work with Visual SourceSafe to deliver quality software enterprise applications?

Still looking for a challenging development job where you are able to use the best tools and processes : Adam Software is hiring!

Read more :


Slides of ALM Roadshow

May 12, 2009

 
As promised to the participants of the ALM Roadshow today in Gent, I’ve uploaded the slides I presented :

Note that these presentations target Visual Studio Team System 2008 (current technology) and not yet the new upcoming release of Visual Studio Team System 2010.

I’ve also uploaded the Product Guide for Visual Studio Team System 2008. This may be interesting for example to know which feature belongs to which client edition of Visual Studio Team System. I always get a lot of questions concerning this topic …

Another general question I got concerning licenses : is it required to have a Client Access License (CAL) to connect to a Team Foundation Server Workgroup Edition? Also taken from the product guide :

Workgroup Edition is provided with Visual Studio Team System 2008 Client Products with MSDN Premium Subscriptions. In addition, CALs are not required for accessing Workgroup Edition.

Feel free to contact me would you require further information!

Update [June 18, 2009]
Video screencasts of the sessions have been uploaded on MSDN Chopsticks :


DYK #4 : unshelve with local pending changes

April 5, 2009

 
You might already have been in the situation where you wanted to unshelve a stored shelveset when having local changes to files that were also changed in the stored shelveset. Out-of-the-box with TFS 2008, this is not possible and you will get the following error dialog :

Your local workspace may not contain pending changes on files that are included in the shelveset. However, there is a way to unshelve with local pending changes. Therefore, you need to have the Power Tools installed for Team Foundation Server.

From the command-line you can execute the tfpt unshelve command with the name of the shelveset to accomplish that.

tfpt unshelve allows a shelveset to be unshelved into a workspace with pending changes. Merges content between local and shelved changes. Allows migration of shelved changes from one branch into another by rewriting server paths.

Like in a normal get latest scenario, you will be asked to resolve conflicts and eventually be redirected to the well known TFS merge window.


DYK #3 : retain build indefinitely

March 17, 2009

 
If you hold on to a specific Team Build retention policy (new since TFS2008), you might lose all valuable build information of a particular build that you actually wanted to keep.

There’s an option available via the Build Explorer to retain builds indefinitely!


DYK #2 : TFS auto-connection

March 5, 2009

 
By default, Team Explorer always tries to automatically connect at startup to the latest known Team Foundation Server. In my case I often start Visual Studio Team System at home when I was previously connected to the Team Foundation Server at work. So, when disconnected from work, I always get the TF30331 error …

Today, this error hit me for the last time! On the Developer Support Team Foundation Server blog I found how to disable the auto-connection! Sweet!

To make this happen, add a DWORD value called “AutoLoadServer” under HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\TeamFoundation (for 2005 – change this to 9.0 for Orcas). A setting of Zero means do not reconnect automatically.


Follow

Get every new post delivered to your Inbox.