Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

display NUnit test description on failure
sferencik
#1 Posted : Wednesday, July 31, 2013 12:53:36 PM(UTC)
Rank: Member

Groups: Registered
Joined: 4/4/2013(UTC)
Posts: 16
Location: Czech Republic

Thanks: 4 times
Was thanked: 1 time(s) in 1 post(s)
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','')
Remco
#2 Posted : Wednesday, July 31, 2013 12:59:38 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
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
sferencik
#3 Posted : Thursday, August 1, 2013 1:13:47 PM(UTC)
Rank: Member

Groups: Registered
Joined: 4/4/2013(UTC)
Posts: 16
Location: Czech Republic

Thanks: 4 times
Was thanked: 1 time(s) in 1 post(s)
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
Remco
#4 Posted : Thursday, August 1, 2013 11:18:56 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Thanks Sam. I've included a task in the backlog to sort this out!
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.031 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download