Code Inspection: NUnit. Specified attribute values produce too many tests
When you specify values for your tests with Range, Random, or Values attributes or create combinations of values with Combinatorial, Sequential, or Pairwise attributes, you may end up having too many tests. For example:
[Test]
public void Test1(
// 2^31 tests
[Random(int.MaxValue)] int x)
{
// do something
}
[Test, Combinatorial]
public void Test2(
// 1M tests
[Random(1000)] int x,
[Random(1000)] int y,
[Random(1000)] int z)
{
// do something
}
Assuming that this number of tests is not what you expect, JetBrains Rider issues a warning about too many tests. By default, JetBrains Rider limits the maximum number of tests to 1000
and it is not configurable in the default UI. However, if you want to change this limit, you can Run Rider in the internal mode and use the Skip parameterized test after input data exceeds [x] items option on the page of JetBrains Rider settings Control+Alt+S.
Last modified: 09 June 2021