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.