I’m proud to announce our first open source project released on GitHub.

The Docx2UnitTest Code Generator is based on an idea of Thomas Bandt. You can read his blog post here.

Philip Proplesch started out with a T4 template (of course edited with Tim Fischer’s fabulous tangible T4 Editor). After he told me about it I had the idea of doing it with a code generator (Visual Studio custom tool). The advantage is that you do not need to copy the T4 files around.

Spend the last few nights pair coding (thanks to my girlfriend for the time to build this amazing stuff!!!)…

Docx2UnitTest
A Visual Studio 2010 custom tool to generate unit tests from Microsoft® Word® 2007/2010 documents.

Supported frameworks are:

Features:

  • It keeps the implementation of tests during re-generation.
  • It keeps test methods attributes

image

Just add a *.docx file to a project in Visual Studio. The test classes will be generated immediately.

image

So give it a try and give us some feedback – I bet the regex to keep the existing code can be improved :-)

Btw: The colorful things in my IDE are TestLint from Typemock and ReSharper from JetBrains.

Get it here on GitHub…