Build/Test Issues

display NUnit test description on failure

Started by sferencik on 6,731 views

When an NUnit test has a description ([Test(Description = "...")]), it would be nice if this was displayed (probably in the output window) in the case of failure. R# does this, and I believe that so does NUnit plain.

(Or is it displayed and I'm missing it?)

Thanks,
Samjavascript:__doPostBack('forum$ctl03$PostReply','')
Hi Sam,

NCrunch doesn't have any kind of special handling for this property, but I see no reason why the description couldn't be dropped into the text output on test failure.

Do you mind if I ask how you're making use of the description? Is it to provide more information about the purpose of a test when it fails?


Cheers,

Remco
Hi, yes, it's like extra info (in addition to the test name) about the test.

The displaying on failure is (I believe) the main reason to prefer Description over a comment:

/// bla bla
[Test]
public void TestBla() {}

vs.

[Test(Description = "bla bla")]
public void TestBla() {}

Thanks,
Sam
Thanks Sam. I've included a task in the backlog to sort this out!

Post a reply

Log in to reply.