resharper-xunit icon indicating copy to clipboard operation
resharper-xunit copied to clipboard

UI freezes

Open sliekens opened this issue 10 years ago • 3 comments

I have a project that contains data driven tests that generate a total of 117 350 test cases (theories). The runner does not seem to be able to handle this many tests. Visual Studio grinds to a halt when I run my tests. It's hard to determine if this is a UI issue or if my tests are running slower because of this. I don't think the runner itself is slowing down though.

sliekens avatar Sep 27 '15 21:09 sliekens

Sounds like it's probably a UI issue - that's a lot of tests :)

What version of ReSharper are you using?

citizenmatt avatar Sep 28 '15 07:09 citizenmatt

9.2 running in VS2015.

Could it be that test progress reporting is slow with that many tests?

sliekens avatar Sep 28 '15 15:09 sliekens

Repro: https://github.com/StevenLiekens/TestRunnerTests

public class DataDrivenTests
{
    public static IEnumerable<object[]> GetNumbers()
    {
        const int Size = 10000;
        var numbers = new List<object[]>(Size);
        numbers.AddRange(Enumerable.Range(1, Size).Select(i => new object[] { i }));
        return numbers;
    }

    [Theory]
    [MemberData("GetNumbers")]
    public void Test(int x)
    {
        Assert.True(x > 0);
    }
}

Try increasing or decreasing the value of Size to see what I mean. A value of 10000 is enough to absolutely slaughter my mid-range laptop.

sliekens avatar Sep 28 '15 17:09 sliekens