Test-Driven Development

TDD and Pairing

Today I spent most of the day pairing on a task with another developer. This is unusual for our company (the usual arguments fears are raised) but we both found it a useful experience. Here's what I learned today.

As part of the pairing scenario, I suggested using a ping-pong test-first approach:

Web Frameworks Evaluation II.iii: Mocking Database Connections in Unit Tests

One of the reasons progress on my web frameworks' evaluation has been so slow of late is that my last check-in broke my CCNET automated build, and, as the good programmer I am, I felt that this needed fixing before I made any more progress.

I'd written some unit tests for the PostController (good) that were accessing the database directly (bad), and for whatever reason the build machine couldn't successfully connect to the database. A classic case of "works on my machine!", and, as is usually the case with such things, a good example of poor design.

An Evaluation of Web Frameworks II.ii: Status Report

It's been a little while since I made any progress on this little project of mine, due to the downtime I suffered throughout December. I couldn't get access to my virtual machine server, so I wasn't able to restart the VM hosting my blog and my Subversion repositories; everything went down together.

As such, it's probably time for an update on where I've got to so far.

An Evaluation of Web Frameworks II.i: Introduction to ASP.NET MVC

ASP.NET MVC is still only a beta, although it has only recently gained this status from the previous "Tech Preview" releases. The rumour is that it will RTM as part of .NET 4.0.

Test-Driven Development

I've recently started reading Kent Beck's excellent book Test-Driven Development by Example at work as part of my self-development goals for this quarter. Test-Driven Development (TDD) is something that I'd heard about, and knew the basic principle of (write the unit tests first and write the code to pass them), but had never tried or bothered to read up on.

Subscribe to RSS - Test-Driven Development