Build/Test Issues

Inclusive test result when no suitable constructor was found? (parameterized test fixture)

Started by GreenMoose on 5,222 views

[v3.15.0.1]
Hi,


    [TestFixture("dummy")]
    internal class BadFixture 
    {
        public BadFixture(int dummy)
        {
            
        }
        [Test]
        public void YouShallNotPass()
        {
        }
    }
    

Given above test fixture (NUnit), NCrunch reports:

NCrunch: This test reported an inconclusive result. You can adjust whether NCrunch should treat this result as a pass by using the 'Consider inconclusive tests as passing' NCrunch project-level configuration setting.
....BadFixture does not have a suitable constructor


Should this really be inconclusive (which you then miss if you have "Consider inconclusive tests as passing" enabled) rather than an error?


Thanks.

Edited

Hi,

This area is under the control of NUnit. I guess NUnit's response to this situation is to consider the test as being inconclusive because it's constructor can't be called. I'm not sure if this is intentional on their part. I personally feel that NUnit should report this as an error. Unfortunately it isn't something that we have any control over.

Post a reply

Log in to reply.