Last week I got a chance to check out a new unit testing related tool called Docx 2 unitTest.
When I first saw it I remembered a previous job where I needed to produce a lot of documents along with my code. It was such a hassle that one of my fellow developers planed to create an application that will automatically generate word documents from the source code so that she won’t need to update them every single day. D2UT does the opposite – it generates (part of) unit tests from a document. So if you feel more comfortable writing documents than writing code (marketing/PM folk – I mean you) or if you need to maintain ordered documents of your test plan (QA) you want to check out Docx2UnitTest.
What it does
After installing the extension all you need to do is create a simple word (2007/2010) document that looks something like this:
Now all you need to do is add the Docx to your project and presto – your tests are automatically created, or at least the test names:
It also creates “tests” for XUnit and MSTest as well.
This tool look like a few “BDD” related tools that enable product managers and marketing folks explain to them developers what they should be doing. It is also a good way to store your test plan/requirements in document form.
The cool thing about this tool is that it uses ms-word which anybody who ever picked a keyboard should have used at least once which means that you do not need to learn how to use a new application just to specify tests.
My only biff is that I’ve needed to add the required project references (NUnit/MSTest/XUnit) by hand – which seemed like a bit of a hassle but other than that this looks like a good start on the right way.
Right now D2UT doesn’t do much but what it does it does well, and it’s a good example of what can be achieved using the new Visual studio extensibility model.