Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

12
  • 1
    Thank you for your response. I was using xunit.console.exe. I am aware that it is not a good solution, and it wasn't really the intended use. The reason I needed it was to debug some string operations while creating a new class using TDD. Commented Aug 23, 2011 at 12:04
  • 49
    "In general, it's a bad road to go down to be reliant on logging and tests." - true, but using Console.Writeline to output stuff WHILE I'm setting up the tests is hugely helpful. Sometimes I'm testing a method and need to see the output of the method (for example if something serialized correctly when doing custom serialization) to insert back into the test to compare against. Commented Dec 7, 2014 at 16:43
  • 19
    Switched to NUnit, which captures stdout. If a test fails, it's greatly important to know what's going on in the production code, in which case the logging becomes important. Injecting any test framework specific dependency into the production code just so I can see the output while running tests is just ridiculous. And I found that when people start telling you "xxx is a bad idea...", although sounds cool, it usually is an excuse to the incompetency of the tool you're having issue with. Commented Jun 12, 2016 at 15:51
  • 36
    So the xUnit authors think that having tests that fail with no information on WHY is a great design? Commented Oct 21, 2016 at 16:00
  • 32
    I disagree strongly on your comment regarding "it's a bad road to go down to be reliant on logging and tests". We run integration tests (apart from unit tests), that if broken, it is extremely helpful to see the logging information to understand what exactly failed before further investigation. Commented Sep 1, 2017 at 12:47