visualstudio.xunit icon indicating copy to clipboard operation
visualstudio.xunit copied to clipboard

Unit tests that timeout are impossible to capture

Open ErikApption opened this issue 6 years ago • 1 comments

Not sure if this a bug or just needs more guidelines but we have been struggling to capture unit tests that cause our dotnet test to timeout. Basically on our pipeline, we have a timeout on dotnet test for 2 hours, we know a good execution takes ~20 minutes but in some rare cases, one of the tests doesn't complete and causes the whole run to fail. From there, there is not clear way to identify which unit test did timeout.

I know there is a setting that is not recommended for timeouts for each unit test, but is the only option to set a timeout for each test? Any way xunit could output every 5 minutes, the name of the test(s) currently running?

ErikApption avatar Nov 28 '19 17:11 ErikApption

This is what you're looking for: https://xunit.net/docs/configuration-files#longRunningTestSeconds

I'm not sure how to see diagnostic messages with dotnet test. @onovotny?

bradwilson avatar Nov 28 '19 19:11 bradwilson

I have verified that diagnostic messages with show up with dotnet test by default:

image

bradwilson avatar May 27 '23 18:05 bradwilson