The last of a series of SQL Server-related database Installers is a little helper that simply makes it easier to bundle several SQL scripts together as part of a single Installer package. Instead of mixing several SqlScriptInstallers together with other Installers, you can group them together in a single container: public class SqlScriptListInstaller : Installer{    public…



In my previous post I described a general-purpose Installer that can be used to create a SQL Server database during installation (and delete it again during uninstallation). As promised, this post picks up where the other stopped to describe another Installer that can execute arbitrary T-SQL scripts against a database. You would typically use this…



Installers provide a consistent way of implementing automated setup logic for an application, and as I previously wrote, they also work admirably well for setting up test fixtures. The BCL, however, only contains a limited amount of pre-built Installers, so if you need to install something else than performance counters, event logs, MSMQ queues, or…


Fixture Setup With Installers

It’s no secret that I prefer unit tests over integration tests. Whenever it’s possible to replace an external resource dependency with a test double, I do that, but sometimes, you need to test the resource access component itself: If you have a data access layer, at some point you should test the data access component…


TechEd Sessions Sample Code

Now that both of my TechEd sessions are over, I’ve had some request for the sample code that I demonstrated at both sessions. The sample code I used at the interactive talk on TDD is attached to this post. The code I demonstrated at my talk on manual and dynamic mocks is available upon request….


What Do You Want To Discuss About TDD?

As previously announced, I’ll be giving two talks at TechEd Developers in Barcelona next week. The second of these is a so-called Chalk Talk; an interactive session on TDD in real life. Since this talk is interactive, it will be up to the audience (to a certain degree, at least) to decide what we should…


Running MSTest In An MTA

Writing deterministic, multi-threaded unit tests may not be your idea of a fun Saturday night, but with a little discipline and knowledge, it can be done, and it sure beats writing multi-dreaded code without the safety net provided by an automated test suite. In this situation, synchronization becomes really important, and the various WaitHandle classes become…


Speaking at TechEd Developers 2007

Again this year, I’ll be presenting at TechEd Developers in Barcelona next month. This year, I’ll be doing both a general session on mocks, as well an interactive session on TDD. You can read more on these sessions by using the conference’s Session Search tool and selecting my name (Mark Seemann) in the Speakers dropdown…


Race Troubleshooting Using The Console Output In VSTS

It must be my week of discovering the obvious. The other day I was troubleshooting a race condition in my code. I had a unit test that faithfully reproduced the error, but just looking at the code involved didn’t produce any sudden insights into its reasons. The nasty thing about race conditions (and multi-threaded code in…


Troubleshooting WCF In Production Environments

WCF is such a nice framework, and its diagnostics capabilities are really comprehensive. Really, I only have two (pseudo-)issues with diagnostics so far: Configuring diagnostics is pretty difficult to do (lots of XML editing involved) Reading trace and message logs is hard. By default, it’s in XML, so it’s ‘human-readable’, but there’s just so much of…