Its been a while since I took my first steps into the wild world of software engineering, but only recently did I finally start down the Test Driven Development path. I have always been a proponent of Extreme Programming but seeing as the majority of my experience, prior to joining the subText Project Team, is from the corporate world, I'd never had the opportunity to truly implement many of the practices in my daily design/development work. I'm not saying that _the corporate world_ doesn't believe in EP and/or TDD, just that our shop doesn't follow these techniques. Anyhow, I finally decided that it was time to take the plunge.
After installing MbUnit 2.3.17 I simply fired up the MbUnit GUI, loaded my subText unitTest Assemblies, hit the Run button, and...
An error occurred while enlisting in a distributed transaction
WTF? A quick chat w/
Phil revealed the issue... most of the
subText tests need to touch a database (MS SQL Server in my case) and in an effort to keep the db clean,
we use the RollBack attribute for our MbUnit tests.

This attribute works by enlisting a COM+ 1.5 transaction from the local Distributed Transaction Coordinator (DTC). This in and of itself is not an issue, but it does cause problems when the db you're trying to access sits on a remote server, as in my case. The COM+ 1.5 transaction attempts to use
Transaction Internet Protocol (TIP) to access the remote SQL server. The problem is that Win2k3 Server & WinXP Pro SP2 both disable TIP by default.
The solution: Enable & Configure TIP on BOTH the remote server and the local dev box. Here's how:
1) On the remote server (Win2k3 Server running SQL Server 2000 in my case) open the Component Services MMC Snap-In (Start -> Control Panel -> Administrative Tools -> Component Services )
2) Now, in the Component Services Snap-In, navigate down the tree until you get to My Computer, and then Right-click and select Properties.
3) Under the MSDTC tab, click the Security Configuration button and then be sure that top of the Security Configuration page has the following options checked: Network DTC Access, Allow Remote Clients, Allow Remote Administration, Allow Inbound, Allow Outbound, No Authentication Required*, Enable Transaction Internet Protocol (TIP) Transactions, and finally Enable XA Transactions.
Just to be sure that the changes took, go ahead and bounce the box... I know you _shouldn't have to_, but lets be honest, how often does this type of thing work the way it's supposed to.
* -> This is necessary if any of the following are true:
- The network access is between computers that are running Microsoft Windows 2000.
- The network access is between two domains that do not have a mutual trust configured.
- The network access is between computers that are members of a workgroup.
Doing this solved the 2nd issue I ran into which was an
Access Denied error when trying to run a transaction.
4) At this point, move to the local dev box and again navigate to the MSDTC -> Security Configuration Properties tab of the Component Services Snap-In. Now, select the same options as above EXCEPT I do not believe you need to check the Enable XA Transactions option, so you can leave it blank. Again, you need to OK out of all open windows and then bounce the box.
At this point, you should be good to go! So fire up MbUnit, load your assembly, and then RUN. I hope that you too see a whole lot of GREEN, and that any red is not a result of failing to enlist a new transaction!