Continuous TDD with Autobuild .Net

Posted by Hibri Marzook on September 2nd, 2009 – 1 Comment

I like the idea of running unit tests continuously as I type and save code.  I read

Technorati Tags:

about Autobuild .Net recently. This is easy to setup and use.

Grab the  code from http://code.google.com/p/autobuildtool/  build it by running the default.build script.

When this is built successfully, the build process creates the tool in the output directory.

Copy the contents of this output directory to the project where you want autobuild to work on.

Autobuild .Net runs a nant build script each time a file is saved in a specific path being watched.

Change the autobuild.build script with the path to the solution file and the path to the unit test assembly.

Next in autobuild.cmd , change the first argument to the directory to watch for changes. The second argument is for the path to autobuild.build. This is the nant build script that autobuild will execute. You can replace this with an existing Nant build script.

Run atuobuild.cmd . That’s it. Type some code, save it and watch the window go red because it didn’t compile. Make it compile and watch it go green.

Write a failing test and see it go red, make it pass and see it go green. Fun eh ? :)

  1. Running tests continuously is awesome.

    I use Autotest to run my javascript lint and unit tests automatically on every file save. Then I report the results using a Growl popup notification, with more detail available on the console.

    See my blog posts for more info:

    http://monket.net/blog/2009/06/autotest-and-js-test-driver/
    http://monket.net/blog/2009/06/javascript-lint-with-autotest/
    http://monket.net/blog/2009/07/autotest-growl-for-windows/

  1. There are no trackbacks for this post yet.

Leave a Reply

*