25 February 2007

Running FitNesse Tests from your Team Build Script

For anyone using FitNesse you may have the need (or just plain desire) to run your FitNesse tests from within your Team Build scripts.  This is a need that we have on a project I'm currently working on so I investigated the various options for implementing the tests within our automated build process.

In the end, I ended up creating a custom build task that allows you to run FitNesse tests as part of your build.  The build task currently supports FitNesse but will also support tsqlunit tests (another testing framework we use) in the near future.

I've placed the custom task on CodePlex here in case anyone else is interested in making use of it.  You can download the installation file here if you're not interested in the source code and just want to install the build task.

The build task works by running the FitNesse test just as you would through a browser - i.e. it makes a request to the specific test page's (or suite's) URL and parsing the resulting HTML to determine the outcome of the test(s).  The advantage to this approach (rather than using the TestRunner.exe application) is that it does not require any FitNesse components to be installed on the build machine.

If you have any suggestions and/or comments, please post them on-line here.  Click here to see an example of how to call the build task.

24 February 2007

Beta Exam 71-510: Study Links

Like several others out there, I am planning on taking the Beta 71-510 exam next week.  Being that this is the first time this test has existed, it is difficult to figure out what to study and where to find study materials (other than the obvious - experience with TFS itself).  I've put together a few links that I've been using while studying for the exam so I thought I'd post them here in case anyone else finds them useful.

02 February 2007

Beta Exam 71-510: TS: Visual Studio 2005 Team Foundation Server

I just saw this post on Rob Caron's blog.  Registration for the 71-510 Beta Exam is now open.  The exam can be taken between February 20th and March 5th.  There are a limited number of slots available on a first-come, first-served basis so sign up quickly!  I signed up this evening without any problems.

Use the promotion code TSVS510 when registering to cover the cost of the exam.

There is a preparation guide available here.  The list of topics is quite length so I'll definitely be spending some time brushing up on a few areas.

See Rob's post for more details.

Displaying Team System reports in the Team Portal

One of the nicest features of the TFS SharePoint site (in my opinion) is the ability to display various reports on the portal's home page.  We currently display a build report as well as a defect report.  To do this, I've always used the default Page Viewer web part and manually set the URL to the desired report.

However, today I noticed a post from Jeff Atwood describing a different approach.  He explains how to install the SQL Server 2005 Reporting Services web parts (which already exist on your TFS server - they just need to be setup).

There are two web parts that get installed - a Report Explorer and a Report Viewer.  The Report Explorer lists each report in a tabular format whereas the Report Viewer gives you more control over how your report is ran and displayed.

Check out his post for more information.

TFS Bug Item Synchronizer 1.1 for Mercury Quality Center - Part 2

A couple of months ago I posted about a utility I happed across that synchronizes Team Foundation Server bugs with Mercury's Quality Center/Test Director product.  At that time I hadn't yet had the opportunity to try the utility out.  This past week I finally planned some time into my iteration to setup the utility and try it out.

Our development team currently uses Visual Studio Team System for development whereas our testers are currently using Mercury Quality Center to track defects.  On past projects I've actually went through the trouble of manually synchronizing defects in both systems (luckily we didn't write too many bugs :-)).  However, even with relatively low defect rates, it still took a good amount of time to keep the two systems in sync.  So, we thought we'd give this new utility a try.

When I first read the setup and configuration help file I was a little overwhelmed at the number of steps it took to complete the installation.  Some of the steps were pretty straightforward and simple - for example, turning on ASP.NET and allowing web services to be called.  Since I was installing this utility on our TFS build machine, these services were already setup and configured.

Next, I ran an MSI installer package that installed the utility's files.  However, even after running the installation, I still had to manually "install" three separate Windows services (via the InstallUtil utility).  It seems to me that this step could have been handle via the MSI package.

Once the services have been installed there is quite a bit of configuration to be setup.  For example, you need to specify your TFS server address and port number, the Quality Center URL, LDAP server (if used), and many others.  You then have to specify which fields map to each other between TFS and Quality Center.  This mapping is handled within XML files and is relatively easy to modify.  I did find that some of the documentation was out of date with what was actually expected in the configuration files but that wasn't too difficult to get around.

The synchronization utility does ship with an administrative tool to aid in the setup and configuration of the various files but there are still a few quirks that need to be ironed out (e.g. the "Defect ID" field not showing up in the TFS list of fields on the mapping tab - you could specify it directly in the XML file but I couldn't find it anywhere in the UI).

Although I ran into a few issues along the way and had several questions related to configuration and processes, I received very prompt and directed assistance (via e-mail) from the main developer of the tool (thanks Ilpo!).  We probably went through no less than 15 e-mail exchanges over the course of 24 hours.  However, at the end of that exchange, I had my Team Foundation Server synchronizing defects with Quality Center.  I was even able to get a few new features added in along the way (I believe two or three new builds were released during that two-day period as well).

So, as of right now, I'm pretty happy with the outcome.  We haven't really had a chance to fully put it through it's paces, but based on what I've seen so far it appears to solve our needs.

Given all that, I'd say the utility works very well but still needs some work on the installation and configuration process.

Click here for more information or click here for pricing.

23 January 2007

TFSBuildManager

For anyone managing multiple build types within Team Foundation Server's Team Build service, you've probably come to realize there are several shortcomings in v1.0.  For example, there's nothing in the IDE that lets you stop a running build for delete completed builds.

Although I've built a couple of utilities on my own to alleviate some of these issues there is now a project on CodePlex which handles these issues very nicely (and looks way cooler than anything I've written for these tasks :-) - TFSBuildManager.

TFSBuildManager has the following features:

  • Start, stop a build
  • Change build/s quality
  • Delete, backup build/s
  • Edit build type

The project is in it's first release but is still very useful.  Click here for some screen shots.

03 January 2007

AssemblyInfoTask Fix for Year 2007

For anyone using the AssemblyInfoTask custom build task you may have noticed that it does not work (using default settings) when performing a build in the new year (2007). This is due to a restriction within Microsoft's version number scheme (i.e. it uses 16 bit numbers).

The AssemblyInfoTask home page suggests a work around by modifying the Microsoft.VersionNumber.targets file (on the build server) and changing all occurrences (there's two of them) of "yyMMdd" to "01MMdd". This will work for the remainder of the year, at which point you'll need to change the format to "02MMdd" for 2008.

If you are like most products and have multiple releases every year then you can leave off the beginning number and use the format "MMdd" (this is what we have chosen to do). The assumption here is that the major and/or minor version number will be incremented long before you reach "1231" at which point it will start over again.

15 December 2006

Visual Studio 2005/TFS Service Pack 1 Released

As announced on Soma's blog, Service Pack 1 for Visual Studio 2005 and Team Foundation Server has been released.
This Service Pack addresses a range of issues that were found through customer and partner feedback as well as our own internal testing. Many of these issues were reported by you and I thank you for taking the time to report them to us. The release also adds a number of customer requested functionality and enhancements to some of the most common development scenarios to Visual Studio that I think you’ll find interesting and valuable.

You can find the full details here.

07 December 2006

TFS Bug Item Synchronizer 1.1 for Mercury Quality Center

I'm currently working in a shop that tracks defects in Quality Center but I would like for our development team to be able to work with TFS defects directly from their Visual Studio IDE. I started to work on an in-house solution for synchronizing defects, however, I recently found out about a utility for synchronizing bug/defect items between Mercury Quality Center and Team Foundation Server. Although I haven't used it yet (I'll be trying it out over the next week or so) it looks to be very promising.

Here is a quick rundown of how it works:

  1. For every selected defect for synchronization in TestDirector/Quality Center, it creates a matching bug item in TFS (with a link to the original defect).
  2. For every selected bug item in TFS, it creates a matching defect in TestDirector/Quality Center.
  3. For every defect updated in TestDirector/Quality Center, it updates the matching bug item in TFS.
  4. For every update in TFS, it updates the matching defect in TestDirector/Quality Center accordingly.
  5. It also offers the possibility of linking one TFS bug item to many TestDirector/Quality Center defects (inside the same project or in different projects) and update all related TestDirector/Quality Center defects when the TFS bug is updated.

It doesn't support attachments at this time but I'm told this capability is coming soon (i.e. possibly next week). I'll post my experiences once I've had a chance to work with it for a little while.

Click here for more information or click here for pricing.

29 November 2006

TFS Permission Manager

The SRL Team has released a new utility to help with the management of Team Foundation Server permissions.? TFS Permission Manager 1.0 has allows you to work with all aspects of TFS-related permissions and includes the following capabilities:

  • Add or remove TFS group memberships, Reporting Services role memberships and SharePoint role memberships
  • Set Server- and Project-level permissions
  • Set Area Path and Source Control permissions
  • Create new TFS users with permissions identical to those of an existing user
  • Save user permissions as a template and use it later to create new or update existing users
  • If you have the responsibility?of managing?permissions on a TFS server then this utility could be a big time saver.

    You can download the utility here.