Test Discovery

Over the last few weeks, I’ve implemented some customization features in the Fixie test framework. The first of these features is now available. Today, we’ll see this feature in action. We’re going to tell Fixie what our tests look like, and Fixie will then find them and run them. Today’s code samples work against Fixie 0.0.1.49. The customization API is in its infancy, and is likely to change as I address more involved features in the coming weeks. The Default Convention If you’ve used NUnit before, you know that you have to mark your test classes with [TestFixture] and your test methods with [Test] in order for NUnit to know that those are your tests. NUnit uses the presence of those attributes to “discover” your tests before it can run them. NUnit is therefore opinionated about test discovery. If you’ve used xUnit before, you know that you have to mark [...]

Enabling Change

Unit testing is meant to enable change by giving you confidence about the current state of your project. However, one of the criticisms of unit testing is that fine-grained tests (such as having one or more tests per method), locks you into implementation details. With fine-grained tests in place, you’re not free to move responsibilities between methods and between classes. How are we to resolve this apparent contradiction? I do lean towards fine-grained tests, especially in the early days of a project. At that point, small implementation details are all you’ve got. As a project grows and evolves, that early “scaffolding” of fine-grained tests may start to become an obstacle rather a change-enabler. Test frameworks are tools meant to give us the freedom to change, but we must deliberately wield them to enable that change. When your fine-grained tests start to discourage change, introduce new tests at a higher level, [...]

“Just” is a Four Letter Word

I’m often guilty of this myself, but I cringe whenever I hear a software developer say that in order to implement a feature, they “Just” have to do x, y, and z. The reality is that even on healthy projects, you will face at least a little more complexity than could be anticipated in advance. [...]

The Boiling Backlog

Software development processes tend to be too prescriptive, leading to waste. For instance, most Agile training prescribes fixed-sized iterations ending with a retrospective meeting. Blindly following this structure may waste time: either you hold an expensive meeting when there isn’t enough to discuss, or you motivate the team to hold back ideas for improvement until [...]

Cutting Scope

Over the last week, I’ve implemented support for async/await in the Fixie test framework. Thanks to a suggestion from Pedro Reys, I found that this project was susceptible to a serious bug, one that NUnit and xUnit both encountered and addressed back when the async/await keywords were introduced in C# 5. While developing the fix, [...]

Isolating Execution

In last week’s post, Dogfooding, I uncovered a bug in the Fixie test framework by trying to use it on two of my other side projects. At the end of that post, I claimed that the bug had something to do with “AppDomains” and stated that it would be fixed once I met the following [...]

Disabling language changes in Visual Studio

On a recent project I used a workstation given to me by the client. It was typical “big enterprise” setup with support for multiple languages. I discovered there’s a keyboard shortcut “Ctrl+Space” for changing your language that I would keep accidentally activating in Visual Studio. This post explains how to disable that. Go to the [...]

Dogfooding

As soon as your software project has a useful feature or two, it’s time to start eating your own dogfood. The usual advice is to use your own software in order to get early feedback, but there’s another major benefit to dogfooding that usually goes unmentioned: To dogfood your software, you have to treat its [...]

Leaky Abstractions Rot Code

Over the past month, we’ve seen the inception and early development of my ongoing side project, the Fixie test framework. As of last week, it was far enough along to run all of its own tests. Although I’m pleased with the progress so far, last week’s success introduced an exceptionally leaky abstraction. Today, we’ll see [...]

Bootstrapping

Last week, I covered the first several commits to Fixie, resulting in a reliable build script. This week, we’ll see how I’ve “bootstrapped” Fixie to the point where it can run all of its own tests. Bootstrapping comes from an old saying. To “pull oneself up by one’s bootstraps”, though literally absurd, is to improve [...]