views:

98

answers:

2

I was reading this blog post: http://www.shakie.co.uk/ramblings/feature-driven-development-riding-the-waves-of-change/ and came across the part about TestDox:

Direct quote (hence PHP):

Take the following test case as an example

class InvoiceTest extends PHPUnit_Framework_TestCase
{
    public function testValueIsInitiallyZero() {
        $invoice = new Invoice();
        $this->assertEquals(0.00, $invoice->getValue());
    }

    public function testWillCloseAutomaticallyIfWholeValueIsPaid() {
        $invoice = Invoice::getInvoiceById(1);
        $invoice->payAmount(100.00);
        $this->assertEquals(true, $invoice->isClosed());
    }
}

In the TestDox format this would translate to:

Invoice

[x] Value is initially zero

[x] Will close automatically if whole value is paid

This would be great on some of the more agile projects I'm working on. I've been looking at TestDox and trying to track down NTestDox as I'm a .NET guy.

3 questions in one here:

Anyone find a copy of NTestDox? (I'm seeing page does not exist on the only useful results in google)

Is generating documentation from your Unit tests a good plan?

Does anyone know of any other frameworks for .NET?

+1  A: 

With NTestDox I unfortunately can't help you, but nevertheless I'd like to answer your last two questions.

Is generating documentation from your Unit tests a good plan?

Whether documenting exiting unit tests will do you any good, I do not know. There is however value to be had from being able to use human readable specifications as part of your test framework if you intend to develop test-driven. Have a look at BDD and ATDD.

This leads to your second question:

Does anyone know of any other frameworks for .NET?

If you look for the benefits of BDD instead of generating documentation from your tests, you could have a look at Cucumber. It should be usable with .NET (see documentation here).

springify
A: 

I can't find any usable traces of NTestDox either.

However I did find nAgileDox and TestDox for .NET which is from early 2010.

Although the pages of Chris Stevenson's AgileDox project at sourceforge only mention his TestDox Java program for JUnit from 2003, the project's CVS repository also contains the nAgileDox C# program with a Console version and a GUI version. Its last update is from 2007. Source and executables are available in the files nAgileSource.zip and nAgileComplete.zip from this directory.

Both nAgileDox and TestDox for .NET work by reading .net assemblies.

See also this related question.

Martin Moene