vidstige
vidstige

Reputation: 13079

Generating documentation from unit tests

We have machine specifications and we have specflow. Specflow translates a textual description into unit tests. But is there any tool that will take NUnit fixtures and create a textual description something like the input of Specflow? Basically the opposite of what specflow is doing.

I'm prepared to adjust how I format my unit-test regarding fixture name and test method name. But I'd rather not use any super fancy syntaxes like machine specifications, but rather just plain NUnit tests fixtures. The reason is that the tests are important and need to be refactorable, etc. Text formats are not so refactor friendly as unit-tests.

For example:

[TestFixture] 
class Given_Four
{
    private Calculator c;

    [SetUp]
    public void Setup()
    {
        c = new Calculator(4);
    }

    [Test]
    public void When_adding_two_then_sum_should_be_six()
    {
        c.Add(2)
        Assert.That(c.Display, Is.EqualTo(6));
    }
}

Again, this just an example. Basically any format of the will work, just as long as the tool creates a textual description of this test fixture. I've been googling around, but found nothing. Do you know of any such tool?

Upvotes: 14

Views: 3521

Answers (1)

Chris McKelt
Chris McKelt

Reputation: 1388

You could try the report runner from the Gallio Test automation framework?

Though the site seems to be down at the moment

http://gallio.org/Downloads.aspx

http://code.google.com/p/mb-unit/

Upvotes: 1

Related Questions