I have a very long running unit test and I'd like some feedback and progression indication. I've tried using Debug.Writelline(), the corresponding Console and Trace methods, but I can't get output from my test.
Can anyone help? I'm using Visual Studio 2012, xUnit and Resharper. There are many articles on the web about this but none of them solve the problem.
Thanks, M
You should break the test down if you can into many smaller tests, unit testing tools are geared up to show the progress of a suite of tests, not show the progress of a single long running test, so they work best with lots of small tests. Its considered bad practice to have long running unit tests as they are generally unmanageable and when they break difficult to work out how to fix.
xunit.net doesn't support writing output as the test progresses. Instead, the output is batched up, and displayed at the end of each test. This is just the way xunit's API works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With