Comment 4 for bug 1074130

Revision history for this message
Charlie Poole (charlie.poole) wrote : Re: Tests in nested folders are not run

The above exception is caused by the test DefaultExceptionThrowerTests.Should_throw_correct_exception_when_resolved_constructors_are_used.

If you comment out that test, no problem arises. Discovery shows 982 test cases and the IDE displays them all.

Editing the expected message for the second and third cases so that the test name does not get truncated also eliminates the problem. Discovery then shows all 985 cases. Of course the edited cases then fail.

My hypothesis is that the truncated test cases are causing some failure in Visual Studio, but I have no way to verify that. I'm told that the truncation is by design. We have a bug for NUnit to try to shorten long names in a more useful way before they go to Visual Studio.

By the way, your tests run fine in the NUnit Gui.

I don't see any more that we can do about this problem, but I'll wait for you to comment before closing the bug. Your best recourse is to either shorten the names of the tests yourself or provide an alternate name using TestCaseData or in your own code that emulates it. I spent a bit of time on this because I thought there might be some way that NUnit could highlight the source of the problem, but it appears to be out of our hands.

Charlie