nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #01709
Re: [Bug 777810] Re: explicit and ignore
This is one possible option. I'll look at it in more detail after the XP2011
conference is over. Perhaps you could clarify what you would like to see
on the user side. From your bug description, it seems you want the tests
to be "yellow" until the NYI feature is complete. Is that so?
(Sometimes people assume that we understand the problem and jump
right away to a solution. But it's hard to understand exactly what problem
is being solved at times.)
Charlie
On Thu, May 5, 2011 at 8:59 AM, Rechenelf <777810@xxxxxxxxxxxxxxxxxx> wrote:
> I have worked on a solution, here it is. Would it be possible to
> integrate this in NUnit itself?
>
>
> [AttributeUsage(AttributeTargets.Method, AllowMultiple=false)]
> public class UnderDevelopmentAttribute : PropertyAttribute
> {
> public UnderDevelopmentAttribute()
> : base("UnderDevelopment")
> { }
> }
>
>
> [DllImport("kernel32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
> public static extern bool IsDebuggerPresent();
>
> public static bool IsDebuggerAttached
> {
> get
> {
> return System.Diagnostics.Debugger.IsAttached /* managed */
> || IsDebuggerPresent() /* unmanged */;
> }
> }
>
>
> [SetUp]
> public void Setup()
> {
> if (TestContext.Properties.Contains("UnderDevelopment"))
> {
> if (!IsDebuggerAttached)
> Assert.Ignore("under development");
> }
> }
>
> --
> You received this bug notification because you are subscribed to NUnit
> Extended Testing Platform.
> https://bugs.launchpad.net/bugs/777810
>
> Title:
> explicit and ignore
>
--
You received this bug notification because you are a member of NUnit
Core Developers, which is the registrant for NUnit Framework.
https://bugs.launchpad.net/bugs/777810
Title:
explicit and ignore
Status in NUnit Test Framework:
New
Bug description:
First the problem:
We make a test, that could not be satisfied up to now, because the implementation of the functionality is not ready. We give him the attribute explicit, so the developer can run the test while he implements the functionality. But for the person who looks at the tests, he didn't see the test. So we make a empty copy of the test and give hin the attribute ignore.
If we give the test both attributes, explicit and ignore, the test is not runable under the gui.
A possibility would be that ignored tests can be run if a special option is set (perhaps on the tab for categories or command line).
This would be a very nice feature!
References