I am playing with NUnit 2.6.3 and I did this tests:
using NUnit.Framework;
using System;
namespace NUnit26Tests
{
[TestFixture]
public class RandomTests
{
[Test]
public void RandomTest([Random(1, 100, 5)] int value)
{
Assert.IsTrue(true);
}
[Test]
public void SuccessTests()
{
Assert.That(true, Is.True);
}
}
}
But most of the execution times (99%) RandomTest is not executing on Test Runner.
This is the output message window:
------ Discover test started ------ NUnit 1.0.0.0 discovering tests is started NUnit 1.0.0.0 discovering test is finished ========== Discover test finished: 6 found (0:00:00,9970583) ========== ------ Run test started ------ NUnit 1.0.0.0 executing tests is started Run started: C:\TestProjects\NUnit26Tests\NUnit26Tests\bin\Debug\NUnit26Tests.dll NUnit 1.0.0.0 executing tests is finished Test adapter sent back a result for an unknown test case. Ignoring result for 'RandomTest(92)'. Test adapter sent back a result for an unknown test case. Ignoring result for 'RandomTest(38)'. Test adapter sent back a result for an unknown test case. Ignoring result for 'RandomTest(69)'. Test adapter sent back a result for an unknown test case. Ignoring result for 'RandomTest(96)'. ========== Run test finished: 2 run (0:00:09,271531) ==========
In this case only one of five RandomTest's was executed.
I have tested with runner Nuget Package and installing NUnit Runner extension, same result.
Any idea what is the problem ?