Test Driven Development with DSL Tools

Saturday, November 17th, 2007

When we were writing Service Factory: Modeling Edition we tried really hard to do some Test Driven Development (TDD) or at the very least write some unit tests around our code. In some cases the approaches we took led to some shortcomings or the code coverage wasn't as high as ...

TDD anti-pattern “inherited or hidden test”

Friday, November 9th, 2007

This post actually started out as my TDD and DSLs post but I got sidetracked into trying to describe an anti-pattern I'd noticed in a some of the unit tests we wrote as part of Service Factory: Modeling Edition. I came across James Carr's excellent TDD anti-patterns post which got me ...

xUnit.net runs tests in random order

Tuesday, November 6th, 2007

When I was testing the behavior of MSTest's DeploymentItem attribute I relied on fact that MSTest executes tests in a predictable order to figure out how the attribute works. Typically it seems to execute test methods in the order they appear in the class. You should never ever rely on this ...

Gotchas: MSTest test projects don’t load on VS Pro

Friday, October 26th, 2007

As is always the way. In the process of writing my last post I found something else that has caught me out in the past. Now it's important to note that this is by design. VS Pro 2005 does not support testing projects. The really good news is that it will ...

Gotchas: MSTest’s [Ignore] attribute

Friday, October 5th, 2007

How would you expect of the following to behave? using Microsoft.VisualStudio.TestTools.UnitTesting; namespace DependencyItemTests {     [TestClass]     public class IgnoreAttributeFixture     {         [TestMethod]         [DependencyItemTests.Ignore]         public void IgnoreAttributeCheckingNotFullyQualified()         {         }     }        public class IgnoreAttribute : Attribute     {     } } I'd expect the IgnoreAttributeCheckingNotFullyQualified test to run just fine. But it doesn't, it's ignored (grayed out in the test view). ...

Gotchas: MSTest’s [DeploymentItem] attribute

Tuesday, October 2nd, 2007

So we've been struggling with our usage of the DeploymentItem attribute within our unit tests on the Service Factory for pretty much the entire project. We had some odd requirements like copying dynamically loaded assemblies into our test deployment root in order to make them available during testing. Essentially it seemed far ...

xUnit released

Wednesday, September 26th, 2007

xUnit is the latest greatest unit testing framework from Jim Newkirk, one of the original authors of NUnit. Jim, Brad and the CodePlex team have finally released it on xUnit.net. I went to a talk by Brad on xUnit a while back it's got lots of cool new features and has ...

Supporting practices… TDD and Shared Space

Saturday, April 7th, 2007

An casual conversation with George, the PM on CodePlex, got me thinking about XP's notion of supporting practices. How does TDD support the notion of shared space? Superficially it doesn't but in fact for me it's really helpful, whether I'm pair programming or working on my own. Inevitably in a team room ...