Build/Test Issues

NUnit Random Test Inputs Break Ignored

Started by CBad on 7,026 views

I have a number of tests that are of the form:

[Test]
public void Test_Some_Action([Random(2, 53, 4)] int N)
{
}


The NCrunch v1.38.0.17b test results are often (but not always) responding with failures with the following error:

This test was not executed during a planned execution run. Ensure your test project is stable and does not contain issues in initialisation/teardown fixtures.


These tests ran fine with prior versions and also run fine using the nUnit test runner directly.

Removing the use of input arguments and hardcoding a value to the variable in the test corrects the problem.

Ideas? Do I just have to avoid random input arguments for now?
Hi, thanks for posting!

Do you notice any difference if you change the framework utilisation type for NUnit? (this can be found in your NCrunch solution configuration).
Switching to UseStaticAnalysis seems to have gotten rid of the issue. Thanks for the tip!
You're welcome! It seems there is a bug in the dynamic analysis here. Thanks for letting me know.

Post a reply

Log in to reply.