Discussion:
NUnit 2.5 Possible Issue
Kelly Anderson
2008-08-27 16:50:43 UTC
Permalink
In NUnit 2.5, if you create an empty TestFixture (that is, there are
no tests in it) it makes the result red. This is even the case if you
mark the fixture with an [Ignore] attribute. Is this expected
behavior?

// This makes a red result.
[TestFixture]
[Ignore("tests need rewriting.")]
public class MyTests
{
/* stuff commented out */
}

-Kelly

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Charlie Poole
2008-08-27 18:37:44 UTC
Permalink
I'm aware of this one but hadn't decided yet the way to go.

The basic story is that NUnit now
1) Treats non-runnable tests similar to errors
2) Considers empty fixtures as non-runnable

I think that the first point is the correct choice - for example,
if you write a test method with arguments but don't provide any
NUnit can't figure out how to run it, so it's an error.

OTOH, treating an empty fixture as non-runnable may not be the
best thing. It could go back to being marked as ignored or
alternatively use the new Inconclusive result.

Charlie
-----Original Message-----
Behalf Of Kelly Anderson
Sent: Wednesday, August 27, 2008 9:51 AM
Subject: [nunit-developer] NUnit 2.5 Possible Issue
In NUnit 2.5, if you create an empty TestFixture (that is,
there are no tests in it) it makes the result red. This is
even the case if you mark the fixture with an [Ignore]
attribute. Is this expected behavior?
// This makes a red result.
[TestFixture]
[Ignore("tests need rewriting.")]
public class MyTests
{
/* stuff commented out */
}
-Kelly
--------------------------------------------------------------
-----------
This SF.Net email is sponsored by the Moblin Your Move
Developer's challenge Build the coolest Linux based
applications with Moblin SDK & win great prizes Grand prize
is a trip for two to an Open Source event anywhere in the
world http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
nunit-developer mailing list
https://lists.sourceforge.net/lists/listinfo/nunit-developer
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Kelly Anderson
2008-08-27 18:46:19 UTC
Permalink
I agree that 1 is correct. 2, not so much. I think Inconclusive would
be a good option, but would not object to Ignored either. No tests to
run is not the same as a failed test, IMHO.

What color does Inconclusive show on the NUnit GUI?

-Kelly

On Wed, Aug 27, 2008 at 12:37 PM, Charlie Poole
Post by Charlie Poole
I'm aware of this one but hadn't decided yet the way to go.
The basic story is that NUnit now
1) Treats non-runnable tests similar to errors
2) Considers empty fixtures as non-runnable
I think that the first point is the correct choice - for example,
if you write a test method with arguments but don't provide any
NUnit can't figure out how to run it, so it's an error.
OTOH, treating an empty fixture as non-runnable may not be the
best thing. It could go back to being marked as ignored or
alternatively use the new Inconclusive result.
Charlie
-----Original Message-----
Behalf Of Kelly Anderson
Sent: Wednesday, August 27, 2008 9:51 AM
Subject: [nunit-developer] NUnit 2.5 Possible Issue
In NUnit 2.5, if you create an empty TestFixture (that is,
there are no tests in it) it makes the result red. This is
even the case if you mark the fixture with an [Ignore]
attribute. Is this expected behavior?
// This makes a red result.
[TestFixture]
[Ignore("tests need rewriting.")]
public class MyTests
{
/* stuff commented out */
}
-Kelly
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Charlie Poole
2008-08-27 18:50:53 UTC
Permalink
Inconclusive is currently a sort of orange color with the same
question mark overlay that ignore has - that's easy to change.

I'm thinking of going with Ignored, since that gives the same
color it has always been.

Charlie
-----Original Message-----
Behalf Of Kelly Anderson
Sent: Wednesday, August 27, 2008 11:46 AM
Subject: [nunit-developer] Fwd: NUnit 2.5 Possible Issue
I agree that 1 is correct. 2, not so much. I think
Inconclusive would be a good option, but would not object to
Ignored either. No tests to run is not the same as a failed
test, IMHO.
What color does Inconclusive show on the NUnit GUI?
-Kelly
On Wed, Aug 27, 2008 at 12:37 PM, Charlie Poole
Post by Charlie Poole
I'm aware of this one but hadn't decided yet the way to go.
The basic story is that NUnit now
1) Treats non-runnable tests similar to errors
2) Considers empty fixtures as non-runnable
I think that the first point is the correct choice - for
example, if
Post by Charlie Poole
you write a test method with arguments but don't provide any NUnit
can't figure out how to run it, so it's an error.
OTOH, treating an empty fixture as non-runnable may not be the best
thing. It could go back to being marked as ignored or alternatively
use the new Inconclusive result.
Charlie
-----Original Message-----
Behalf Of
Post by Charlie Poole
Kelly Anderson
Sent: Wednesday, August 27, 2008 9:51 AM
Subject: [nunit-developer] NUnit 2.5 Possible Issue
In NUnit 2.5, if you create an empty TestFixture (that is,
there are
Post by Charlie Poole
no tests in it) it makes the result red. This is even the
case if you
Post by Charlie Poole
mark the fixture with an [Ignore] attribute. Is this expected
behavior?
// This makes a red result.
[TestFixture]
[Ignore("tests need rewriting.")]
public class MyTests
{
/* stuff commented out */
}
-Kelly
--------------------------------------------------------------
-----------
This SF.Net email is sponsored by the Moblin Your Move
Developer's challenge Build the coolest Linux based
applications with Moblin SDK & win great prizes Grand prize
is a trip for two to an Open Source event anywhere in the
world http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
nunit-developer mailing list
https://lists.sourceforge.net/lists/listinfo/nunit-developer
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Loading...