What is the difference beetwen Ignored test and Skipped tests?

1,404 views
Skip to first unread message

AMiR

unread,
Mar 5, 2009, 2:55:01 AM3/5/09
to NUnit-Discuss
What is the difference beetwen Ignored test and Skipped tests?
And when we should use it?

Charlie Poole

unread,
Mar 5, 2009, 12:49:51 PM3/5/09
to nunit-...@googlegroups.com
In the sort of unit testing NUnit is designed for, Ignoring
a test is considered a "bad thing." For that reason, it is
highlighted in the Gui with a Yellow bar. Skipping is not
available to the user directly, but is a state that can
be reached if some requirement for the test is not met.

For example, if a test is not able to run on a certain
operating system, you may indicate this with the Platform
attribute. When you run your test suite on that platform,
the test is recorded as Skipped and your suite will still
succeed if all the other tests pass.

The name "Ignore" is with us for historical reasons. It
would be better if we had another name for it that doesn't
seem quite so neutral. In earlier releases of NUnit, tests
that were incorrectly formed and could not be run were also
treated as Ignored, but we now have a status of "NotRunnable"
for them, which is handled as an error.

Charlie

Steinar Dragsnes

unread,
Mar 5, 2009, 3:32:51 PM3/5/09
to nunit-...@googlegroups.com
Hi!

I think the ignore attribute has it's place. We usually also create unit tests for reported bugs to reproduce them and sometimes the fix cannot be decided. This happens often in very complex calculations or simulatrions where the researchers has to come up with a solution to the problem (for instance how a border case should be handled). This can take time and in the meantime, the yellow ignored test reminds about the task we need to fix sooner than later.MSUnit has the same thought, there you can flag a test result as Inconclusive: Assert.Inconclusive("Message");.

Cheers,
Steinar.

Simone Busoli

unread,
Mar 5, 2009, 4:32:47 PM3/5/09
to nunit-...@googlegroups.com
Looks like a good thread to ask for opinions. I have a project with several tests marked with the Ignore attribute because they run against a payment gateway which doesn't provide a test environment, therefore I cannot run them, not always at least. I know they are working, but I can't run them. Pretty silly, I know, but that's the best I could come up with.

Charlie Poole

unread,
Mar 5, 2009, 4:55:26 PM3/5/09
to nunit-...@googlegroups.com
Hi Steinar,
 
FWIW, NUnit now has an Inconclusive state in addition to ignored. That leaves Ignored
as needing to be used to temporarily suspend testing of something that you are planning
to fix - as you say, it's a reminder.
 
Charlie


From: nunit-...@googlegroups.com [mailto:nunit-...@googlegroups.com] On Behalf Of Steinar Dragsnes
Sent: Thursday, March 05, 2009 12:33 PM
To: nunit-...@googlegroups.com
Subject: [nunit-discuss] Re: What is the difference beetwen Ignored test and Skipped tests?

Steinar Dragsnes

unread,
Mar 6, 2009, 5:30:29 AM3/6/09
to nunit-...@googlegroups.com
Hi!

Ignored is good enough for me.

Cheers,
Steinar.

Charlie Poole

unread,
Mar 6, 2009, 12:47:36 PM3/6/09
to nunit-...@googlegroups.com
I always thought so, but Theories provided a reason to need Inconclusive as well.
 
Charlie


From: nunit-...@googlegroups.com [mailto:nunit-...@googlegroups.com] On Behalf Of Steinar Dragsnes
Sent: Friday, March 06, 2009 2:30 AM

Charles Ritchea

unread,
Apr 23, 2014, 9:21:02 AM4/23/14
to nunit-...@googlegroups.com, cha...@nunit.com
Welcome, I come from 5 years in the Future! Kale is down, Horned Melon is up, Microsoft is using Android, there is a pandemic of Click Bait.

Seriously though, When I select specific Tests to run, whether from a GUI or command line option does that change the Test Status to Skipped? I have a bunch of Integration tests against a RESTful API that processes media files in a time consuming way. These tests would greatly benefit if I could submit jobs in parallel and wait for completion before running Tests. I would like to know which tests were actually selected to run so I only submit jobs for those specific tests. I was hoping I could use the TestContext to determine this.

Charlie Poole

unread,
Apr 24, 2014, 8:08:19 AM4/24/14
to nunit-...@googlegroups.com
The Skipped (or Passed, or Ignored, etc.) status only applies to the
tests you actually selected to run. The tests you did not select are
not reported by NUnit at all.

Charlie
> --
> You received this message because you are subscribed to the Google Groups
> "NUnit-Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nunit-discus...@googlegroups.com.
> To post to this group, send email to nunit-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/nunit-discuss.
> For more options, visit https://groups.google.com/d/optout.

Charles Ritchea

unread,
Apr 24, 2014, 9:27:19 AM4/24/14
to nunit-...@googlegroups.com, cha...@nunit.com
Ok, I guess my question is: Is there anyway to programmatically tell which tests were selected to run from a SetUpFixture for instance?

Charlie Poole

unread,
Apr 25, 2014, 8:23:28 AM4/25/14
to nunit-...@googlegroups.com
No, you cannot find out what will be run from any type of setup.

With SetupFixture, the idea is that you will place different tests,
requiring different setup, in different namespaces.

Charlie

Charles Ritchea

unread,
Apr 25, 2014, 8:26:04 AM4/25/14
to nunit-...@googlegroups.com

Thanks Charlie! I can work with that, just needed to know my limitations.

You received this message because you are subscribed to a topic in the Google Groups "NUnit-Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nunit-discuss/GH5Zp_WWOdw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nunit-discus...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages