:: thoughts on team system and more RSS 2.0
# Monday, April 02, 2007

 

As a follow-up to the last post on how to use BisSubscribe.exe for setting up email notifications on work item changes, here’s a sample on how to use BisSubscribe to generate an email whenever someone does a check-in and overrides a check-in policy:

 

BisSubscribe.exe /eventType CheckinEvent /address mathias@win2003 /deliveryType EmailHtml /filter "PolicyOverrideComment <>''" /server http://localhost:8080

Whenever a user checks-in code and does a policy override a mail like the one below is sent:

Monday, April 02, 2007 8:28:34 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -
Team System

 

A common issue when working with Team Foundation Server and work items is how changes in a work item can be notified to a user using standard email.

 

By using the BisSubscribe.exe tool (discussed in the previous post) we can use a command-line utility that adds subscribers to the TFS notification database. The tool can be used for setting up email notifications as well as notifications to a generic web service for application level integration. In this scenario we’ll use the email option.

 

So to register for a notification when a work item’s status changes we’ll use this command:

 

BisSubscribe.exe /eventType WorkItemChangedEvent /deliveryType EmailHtml /server http://localhost:8080 /address mathias@win2003 /filter """"PortfolioProject""" = 'Effective VSTS' AND ("""ChangedFields/StringFields/Field[ReferenceName='System.State']/OldValue""" <> """ChangedFields/StringFields/Field[ReferenceName='System.State']/NewValue""")"

 

Whenever someone changes the status of a work item TFS will produce a mail similar to the following:

 

Monday, April 02, 2007 8:19:33 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -
Team System

 

TFS comes with a tool called bissubscribe.exe, typically installed at “C:\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\TF Setup”. Bissubscribe is a command-line tool that adds subscribers to the TFS notification database (tbl_Subscriptions).

 

Note: it might be tempting to configure subscriptions directly in the database but currently changes made to the table won’t be reflected until the TFS service is restarted. So to avoid additional headache just use BisSubscribe or the TFS API to manage subscriptions.

 

The tool can be used for setting up email notifications as well as notifications to a generic web service for application level integration.

 

The following commands are available in BisSubscribe:

 

BisSubscribe - Team Foundation Server BisSubscribe Tool

(C) Copyright 2006 Microsoft Corporation. All rights reserved.

 

BisSubscribe.exe

 

Usage:

 

BisSubscribe /eventType <eventType> /address <emailOrSoapAddress> [/deliveryType EmailHtml|EmailPlaintext|Soap] [/server <servername>] [/filter <filterString>] [/tag <tag>]

BisSubscribe /unsubscribe /id <id> [/server <servername>]

 

where:

 

eventType:    The name of the event.  Case sensitive.

filter:       (default none) A filter expression.

address:      The email address or webmethod URL for the subscriber.

server:       The Team Foundation Server name.

tag:          (default none) A field to later use to identify this subscription.

deliveryType: (default Soap) EmailHtml|EmailPlaintext|Soap indicating the preferred format.

id:           The integer id for the subscription to be deleted when unsubscribing.

 

The two parameters that I think requires some extra explanation are:

 

·         eventType: type of event to subscribe to. See this post of a list of events and how to work with them.

 

Note: the tool is case-sensitive, so make sure to spell the event type correctly.

 

·         filter: a filter expression applied to the data passed for the generated event.

 

The TFS SDK on MSDN has a section on how to use filters. See Filtering Team Foundation Server Events http://msdn2.microsoft.com/en-us/library/bb130302(VS.80).aspx for more details.

 

So for example to register an email notification based on the check-in event we issue the following command:

 

BisSubscribe.exe /eventType CheckinEvent /address mathias@win2003 /deliveryType EmailHtml

Monday, April 02, 2007 8:07:19 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -
Team System

 

When working with notifications from TFS it is necessary to know which event to subscribe to. Unfortunately that list is not generally documented so here’s the list of events raised by TFS today: 

 

Event

AclChangedEvent

BranchMovedEvent

BuildCompletionEvent

BuildStatusChangeEvent

CheckinEvent

CommonStructureChangedEvent

DataChangedEvent

IdentityCreatedEvent

IdentityDeletedEvent

MembershipChangedEvent

NodeCreatedEvent

NodePropertiesChangedEvent

NodeRenamedEvent

NodesDeletedEvent

ProjectCreatedEvent

ProjectDeletedEvent

WorkItemChangedEvent

 

Of the events in the list the most commonly used are CheckinEvent for check-in notifications and WorkItemChangedEvent for work item changes.

 

The following TFS web service can be invoked to get a list of the currently registered events:

 

http://localhost:8080/services/v1.0/Registration.asmx?op=GetRegistrationEntries

 

Among the details in the resulting XML we find XML schema definitions for some of the key event types.

 

In the same folder as BisSubscribe.exe (see the upcoming post for details on using BisSubscribe.exe) we also find XML Schema files for some of the key events. These files are useful when designing filters for the event notifications.

 

Finally, the list of events can be manually modified using the command-line tool TfsReg.exe.

Monday, April 02, 2007 8:01:32 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -
Team System
# Saturday, March 31, 2007

Yesterday I gave a talk at the local Swedish DOTNET user-group, SweNug, about how to improve software quality using Visual Studio Team System. This presentation covers both client-side tools, like unit-testing, code coverage and profiling, as well as the server-side features of Team Foundation Server.

The presentation can be downloaded here: Quality Software using VSTS.ppt (1.67 MB)

Saturday, March 31, 2007 2:40:59 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -
Team System

Last week I started off a series of seminars together with Microsoft Sweden on the topic "Effective Software Development using Visual Studio Team System". The focus in these presentations is to talk about why it is so hard to build software today and how tools like Visual Studio Team System can help that situation. The presentation covers: 

  • The situation today
  • The VSTS concept and how it addresses important issues in today's project
  • Agile software development
  • Team foundation server and how it helps to make collaboration in teams better.

The presentation can be downloaded here: Effective VSTS.ppt (2.84 MB)

For the list of events, look at the Swedish MSDN site: http://www.microsoft.com/sverige/msdn/

The next upcoming event is on april 24 in Stockholm and you can register for it here: http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032334913&culture=sv-SE

Saturday, March 31, 2007 2:32:46 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -
Team System
# Monday, March 26, 2007

Today Microsoft announced the aquisition of TeamPlain, the brilliant web-frontend for Team Foundation Server, from the company DevBiz. The full press-release can be found here.

TeamPlain solves some of the most common issues people have with Team Foundation Server and its web-frontend (or, rather, lack of it). TeamPlain has a really neat UI that will appeal to the entire team, not only to users outside of Visual Studio (like project managers, business analysts and end-users).

All users with valid client access licenses of Team Foundation Server can download the product here and start using it right away.

Monday, March 26, 2007 9:59:00 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -
Team System
# Thursday, February 22, 2007

The latest release of the Team Foundation Power Tools (v.1.2) is now available for download!

The new features I find most intreresting this time are these:

- a set of check-in policies (custom path policy, forbidden patterns, changeset comments, work item query). Basic stuff really, but things most companies would use so it's nice not to have to write them again :-).

- Joel Semeniuk Process Template Editor has been integrated into Visual Studio as a DSL tool. The best tool around for managing the hefty set of xml files that defines a VSTS process has been adopted by the company.

TFPT can be downloaded here.

The Process Template Editor requires the Visual Studio DSL toolkit that can be downloaded here.

Thursday, February 22, 2007 9:01:53 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -
Team System
# Wednesday, February 21, 2007

Virtual PC 2004 has been available for free for a while. Now the updated version (that also support 64-bit windows) is available:

Virtual PC 2007 page:
http://www.microsoft.com/windows/products/winfamily/virtualpc/default.mspx

The Virtual PC 2007 download:
http://www.microsoft.com/downloads/details.aspx?FamilyId=04D26402-3199-48A3-AFA2-2DC0B40A73B6&displaylang=en

And if it's needed, the Virtual PC 2004 SP1 download:
http://www.microsoft.com/downloads/details.aspx?FamilyID=6d58729d-dfa8-40bf-afaf-20bcb7f01cd1&DisplayLang=en

Wednesday, February 21, 2007 5:12:56 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -
General
# Thursday, February 15, 2007

Many people seem to have a hard time finding a good procedure to migrate unit test from nUnit to VSTS so I thought I'd post the way I'd make the conversion.

Jim Newkirk has created a conversion tool that's available at http://www.gotdotnet.com/workspaces/workspace.aspx?id=91936c5e-461f-4027-bdba-8a46f52fefdb.

Personally I prefer to do the conversion by hand (not a lot of work anyway). Here's also a step-by-step guide for manually converting nUnit tests to a VSTS unit test project:

1. Add a reference to Microsoft.VisualStudio.QualityTools.UnitTestFramework.

2. Remove reference to nunit.framework.

3. Change the following namespace imports:

C#: Change using NUnit.Framework declaratives to using Microsoft.VisualStudio.TestTools.UnitTesting
VB: Change Imports NUnit.Framework declaratives to Imports Microsoft.VisualStudio.TestTools.UnitTesting

4. Search and replace the following:

C#: [TestFixture] => [TestClass]
VB: <TestFixture()> => <TestClass()>

C#: [TestFixtureSetUp] => [ClassInitialize]
VB: <TestFixtureSetUp()> => <ClassInitialize()>

C#: [TestFixtureTearDown] => [ClassCleanup]
VB: <TestFixtureTearDown()> => <ClassCleanup()>

C#: [SetUp] => [TestInitialize]
VB: <SetUp()> => <TestInitialize()>

C#: [TearDown] => [TestCleanup]
VB: <TearDown()> => <TestCleanup()>

C#: [Test] => [TestMethod]
VB: <Test()> => <TestMethod()>

Assert.Ignore => Assert.Inconclusive

5. Open the Visual Studio project file in Xml (using Open As... in Visual Studio or use Notepad) and add the following to the msbuild script:

Paste the following line in the <PropertyGroup> that contains <AssemblyName> and other properties:

C#: <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
VB: <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>

Thursday, February 15, 2007 10:10:19 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -
Team System
# Saturday, January 20, 2007

This week I found myself wanting to look at the raw XML data sent between a client and a service. Of course the WCF tool SvcTraceViewer generally makes more sense to use for tracing, but sometimes it's necessary to look at the actual data on the wire. In such case a tcp trace tool can be used and placed in-between the caller and the service. In the end this was really easy to setup but in order to save someone else the hour or so to figure it out here's how it works:

For tracing I used Simon Fell's tcpTrace available at http://www.pocketsoap.com/tcptrace/.

First start tcpTrace. It needs to sit in the middle of the call so have it listen to the port the server exposes and forward to different port. Then configure the server to listen to the port tcpTrace forwards to using the listenUri configuration setting. The client doesn't have to be changed since all it does is call tcpTrace, which then forwards to the service. The config used looks like this: 

Server config:

<service name="Service.Calculator">
   <
endpoint address="http://localhost:8001/CalculatorService"
                 listenUri="http://localhost:8002/CalculateService"
                 binding="basicHttpBinding"
                 contract="Service.ICalculator"         
   />
</
service>

Client config:

<client>
   <
endpoint address="http://localhost:8001/CalculatorService"
                 
binding="basicHttpBinding"
                 
contract="ICalculator"

   />
</
client>

Saturday, January 20, 2007 1:51:49 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [1] -
WCF (Indigo)
# Thursday, January 11, 2007

Note to self: Just to save the extra minutes to find the darn download - the VSTS Team Explorer can be downloaded here.

Thursday, January 11, 2007 9:21:10 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -
Team System
Navigation
Archive
<April 2007>
SunMonTueWedThuFriSat
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008
Mathias Olausson
Sign In
Statistics
Total Posts: 74
This Year: 22
This Month: 6
This Week: 2
Comments: 29
Themes
Pick a theme:
All Content © 2008, Mathias Olausson
DasBlog theme 'Business' created by Christoph De Baene (delarou)