It'd be nice if tests that throw a NotImplementedException could be shown as Pending rather than Failed. It would make me feel better about it, anyway ;)
Remco NCrunch Developer
#286
02 Sep 2011 12:17 UTC
This is an interesting suggestion. I think the complexity here would be in differentiating between a test that was deliberately throwing a NotImplementedException and a test that was throwing a NotImplementedException by calling into actual production code that is expected to be working :)
I'd like to read a bit more into your intention. Is it that you're writing incomplete test stubs and wanting to have these stubs tracked by NCrunch, but not necessarily executed?
I'd like to read a bit more into your intention. Is it that you're writing incomplete test stubs and wanting to have these stubs tracked by NCrunch, but not necessarily executed?
No, my normal TDD workflow is to write a test then I use ReSharper to generate any new methods, and in their bodies it throws a NotImplementedException.
Some test runners (e.g. ReSharper) treat a test that throws one of those as inconclusive, and it shows up yellow rather than red. So, I can keep an eye on the tests as I work and fix any reds, and when there are none left I know its time to do the next yellow. Would be really nice to get this same feedback with NCrunch.
The tests are run (so aren't ignored or anything), it's merely the exception that was thrown that flags it as inconclusive.
Some test runners (e.g. ReSharper) treat a test that throws one of those as inconclusive, and it shows up yellow rather than red. So, I can keep an eye on the tests as I work and fix any reds, and when there are none left I know its time to do the next yellow. Would be really nice to get this same feedback with NCrunch.
The tests are run (so aren't ignored or anything), it's merely the exception that was thrown that flags it as inconclusive.
Edited 02 Sep 2011 12:30 UTC
Remco NCrunch Developer
#293
02 Sep 2011 18:27 UTC
This makes sense. NCrunch doesn't currently have an 'inconclusive' status, but it needs one for a number of reasons. I don't see why tests can't be marked as inconclusive on a NotImplementedException - provided other test runners have already set the standard that is :)
On the list it goes.
On the list it goes.
I would argue that if you have production code that throws NotImplementedException that you are doing things wrong. If you have, say members of an interface or an abstract class, that you do not provide an implementation for then you should instead be throwing NotSupportedException
Post a reply
Log in to reply.