Console output from Unit Tests does not use carriage return when logging
Answered
I am using Rider 2018.3.1 on macOS 10.14.2.
When I output something with Console.WriteLine() the output seems to advance by one line, but does not go back to the beginning of a line.
When I do the same debugging/running a regular application it works fine.
Also: when I run the unit test and it completes, how can I see the Console?
Thanks in advance for your help.
Markus
Please sign in to leave a comment.
I've seen the same thing on Linux using several Rider versions; currently 2019.1 EAP4.
Same here on macOS 10.13.6, really annoying. Anyone has a solution?
Still not fixed....
Hello!
Please, take a look at https://youtrack.jetbrains.com/issue/RIDER-21981.
If you have any questions, please let me know.
Sofia Byzova I have the same issue, but in my case, I'm not using Console.WriteLine in the tests per se, I have a few of them in my code, impossible to read in that console. Is there any way to remove this extra empty space?
Hi Eduardo Revuelta,
Thank you in advance.
I have the same issue. I run on MacOs, with latest EAP. When running a unit test, all output misses the new line. Here is an example of a unit test (xunit in this case) and the output. It would be very nice if this bug is being fixed
Hello Peter,
As it was stated in the issue mentioned RIDER-21981 Debug Console output basically is not intended for test process output. In order to get that you better use ITestOutputHelper instead of Console.WriteLine(). However, here is the current issue for fixing the rendering of carriage return: RIDER-30465. Please watch it for monitoring the status. Let me know if you have other questions.
Thanks Olga Diakonova, this works, except that I can only see the output when the test is done. But that's ok!