Is there a way for an nunit test to end and tell the test runner that it should be considered skipped/ignored, rather than succeeded or failed?
My motivation for thi
Assert.Ignore();
is specifically what you're asking for, though there is also:
Assert.Inconclusive();
I am having a TestInit()
, TestInitialize
method where there is a condition like:
//This flag is the most important.False means we want to just ignore that tests
if (!RunFullTests)
Assert.Inconclusive();
RunFullTests is a global Boolean variable located in a constant class. If we set this to false the whole test class will be ignored and all the tests under this class will be ignored.
I use this when there are integration tests.