Thursday, June 18, 2009

NSynthesis 0.1.1 has escaped!

I'm delighted to announce that NSynthesis 0.1.1 has finally escaped from my laptop where it has languished for many months. It can be downloaded from here.
NSyntheis is a .NET implementation of the Ruby project, Synthesis. The idea is to connect tests which mock expectations to a corresponding test of a real implementation of the mocked call. Why? To give you more confidence that all those itty bitty unit tests add up to a comprehensive test suite.
Using PostSharp to hook into the gap between your test assembly and your production code, NSynthesis monitors your unit tests as they run. For each expectation set in your tests, NSynthesis demands that you have executed every possible concrete implementation during the same test run. NSyntheis uses PostSharp to modify the test code only, so there are no changes required to your production code base.
Currently, NSynthesis requires that you are using the following tools
  • NUnit 2.5
  • Rhino Mocks
  • Nant
The project is definitely at the curiosity stage of development. It needs to be run in on a proper project - so if you fancy giving it a go let me know how you get on with it.
The main issue which needs to be fixed next is handling multiple test runs in a build. Currently, there is no memory of the various unit test stages which you may have in a more advanced build (e.g. standalone tests, wired tests, functional tests). This is an issue if the mocked calls and the real code calls are not contained in the same test run.
Many thanks to Alex Scordellis, especially for his help with the evil .NET reflection API.

1 comment:

Nigel said...

This is such a good idea! Great work!