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

Notification

Icon
Error

NUnit [Random] supported?
wernight
#1 Posted : Tuesday, June 12, 2012 10:19:37 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/11/2012(UTC)
Posts: 7

Thanks: 1 times
All tests using RandomAttribute seem to fail.

Code:

    using NUnit.Framework;

    [TestFixture]
    class Program
    {
        [Test]
        public void MyTest([Random(-3.0, 3.0, 100)] double doubleValue)
        {
        }
    }



"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."

Also, it's a little weird to count that test as 100 unit tests (in the Risk/Progress).
Remco
#2 Posted : Tuesday, June 12, 2012 10:10:26 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,

NCrunch doesn't support the NUnit Random attribute when using Dynamic Analysis. Try changing your 'Framework utilisation type for NUnit' to 'StaticAnalysis' under your NCrunch solution configuration. Note that if you are using other advanced/edge NUnit features, the support for these is quite limited under static analysis. It may be easier to implement the random behaviour manually in your test.


Cheers,

Remco
1 user thanked Remco for this useful post.
wernight on 6/13/2012(UTC)
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.021 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download