Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

NUnit Random Test Inputs Break Ignored
CBad
#1 Posted : Tuesday, April 3, 2012 6:59:51 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/3/2012(UTC)
Posts: 3
Location: Edmonton

Thanks: 1 times
I have a number of tests that are of the form:

Code:
[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:

Quote:
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?
Remco
#2 Posted : Tuesday, April 3, 2012 9:21:42 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
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).
1 user thanked Remco for this useful post.
CBad on 4/3/2012(UTC)
CBad
#3 Posted : Tuesday, April 3, 2012 9:26:26 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/3/2012(UTC)
Posts: 3
Location: Edmonton

Thanks: 1 times
Switching to UseStaticAnalysis seems to have gotten rid of the issue. Thanks for the tip!
Remco
#4 Posted : Tuesday, April 3, 2012 10:25:54 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
You're welcome! It seems there is a bug in the dynamic analysis here. Thanks for letting me know.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.029 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download