vstest icon indicating copy to clipboard operation
vstest copied to clipboard

Suggest using /Blame when testhost crashes

Open kendrahavens opened this issue 5 years ago • 2 comments

Description

We've added a Blame DataCollector that can help identify what test is crashing the testhost, but few users discover it or remember it when they need it. It'd be helpful to suggest running with /Blame in the testhost crash output.

Related to https://github.com/microsoft/vstest/issues/1125 User feedback twitter thread: https://twitter.com/archiecoder/status/1248405123929276420

AB#1587368

kendrahavens avatar Apr 10 '20 00:04 kendrahavens

TBH I'm finding the /Blame feature by itself rather useless. Knowing which test ran last isn't really that helpful - usually if a crash occurs, it's off-thread coming from a finalizer or background thread, so it really could be any previously running test causing it. It doesn't seem to me it gives much more information than the standard output window.

The only Blame command I find useful is /Blame:CollectDump;CollectAlways=true;DumpType=full. However this will fail once a crash occurs, telling that you need to set a PROCDUMP_PATH to the folder where procdump.exe resides, and now I have to re-run again and hope that this time I got it right. This is rather poorly documented and the tool doesn't appear to be a part of Visual Studio. I'd prefer this tool came as part of Visual Studio and vstest.console.exe would by default pick it up.

Also when running for instance UWP unit tests, if UWP crashes all we get is information that the socket communication with the test running was severed - I'd rather by default the process was monitored and we were told a lot more info about why the process exited. In general troubleshooting crashing test runs could use some documentation and tooling love to make it easier for people to find what the problem is.

dotMorten avatar Apr 10 '20 15:04 dotMorten

Note: upon testhost crash (or failure to launch), we want to display a message suggesting to use the blame command.

Evangelink avatar Aug 02 '22 12:08 Evangelink