Re: Addin Error Reporting Issue

"Daniel M. Pomerantz" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nunit.devel
Message-ID <[email protected]>
Thanks for clearing all of that up.  As for the colours, mea culpa.  I 
use TD.Net, which is part of my issue.

Your explaination of the difference between Ignore and Explicit makes 
perfect sense, but for various reasons, we never use [Ignore].  If a 
test is marked as [Ignore] it is impossible to force it to run without 
removing the [Ignore] attribute.  This just seems dangerous to me, as I 
it opens the door for accidentally checking code in without adding the 
attribute back to the test, and thus breaking the build.  We use 
Explicit in stead since it allows us to still run the test, even if its 
just to test it.  Note, this same behaviour is exhibited in TD.Net, and 
after talking to Jamie, I got the impression he simply mimics the 
behaviour of nunit.exe (as he should). 

I understand that ExplicitAttribute and IgnoreAttribute have different 
reasons.  Thanks for pointing that out to me.  I would like to make the 
following requests / suggestions:

1)  Allow Ignored tests to be run through the runner without removing 
the attribute.  Jamie will likely follow suit.

2)  If you do that, I open the question again of why have both, but I do 
see the reason.  I guess just think about it.

3)  More clearly document the differences.

Thanks,

dmp

Charlie Poole wrote:
> Hi Daniel, 
>
>   
>>> Generally, if you want it to be non-runnable (yellow) do it at load 
>>> time and if you want it to fail (red) do it at run time
>>>       
>> I asked this several weeks ago and never saw and answer.  
>> NUnit currently supports the attributes [Ignore] and 
>> [Explicit].  The only difference I have seen thus far is that 
>> [Explicit] allows you to run a test if you choose to do so 
>> (It goes from Yellow to Red or Green), without removing the 
>> attribute, and [Ignore] does not.  What is the reason for 
>> having both?  Is there a reason why [Ignore] shouldn't be 
>> either depricated or turned into an alias of [Explicit]?  At 
>> the very least, for 3.0?
>>     
>
> First, a correction... Explicit shows as grey, not yellow. It
> was yellow in an early version, but that was a bug.
>
> Ignore is treated by NUnit as a problem - that's why it shows
> as yellow. Explicit is not treated as a problem. Some people,
> I suspect, use Explicit to give the effect of an Ignore that
> never shows up on the test reports, but I don't think that's
> a good practice.
>
> The idea of Ignore is that you are temporarily stopping the
> running of a test for some reason - like it crashes the
> whole run - but you will be solving the problem in a short
> time. Teams I work with get a daily list of ignored tests
> from the nightly run and it's supposed to be short or empty
> and any igored tests should not stay there long.
>
> An Explicit test is one that is not ever intended to be part
> of the regular continuous or nightly test runs. Therefore,
> NUnit silently passes over them without reporting anything
> wrong at all.
>
> So while some people may use them in similar ways, they are
> intended for different purposes and NUnit therefore reports 
> them differently.
>
> That said, I think we do need to look at the options for
> various RunStates and ResultStates for tests in 3.0.
>
> Charlie
>   
>> dmp
>>
>>
>>     
>
>
>
>
>   

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.