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

3
9 comments
Avatar
Permanently deleted user

I've seen the same thing on Linux using several Rider versions; currently 2019.1 EAP4.

0
Avatar
Permanently deleted user

Same here on macOS 10.13.6, really annoying. Anyone has a solution?

0
Avatar
Permanently deleted user

Still not fixed....

0

Hello!

Please, take a look at https://youtrack.jetbrains.com/issue/RIDER-21981.

If you have any questions, please let me know.

0
Avatar
Permanently deleted user

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?

0

Hi Eduardo Revuelta,

Could you please share an example of your code(file/screenshot) or a repro-solution?

Thank you in advance.
 
Sofia.
0

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

0

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.

0

Thanks Olga Diakonova, this works, except that I can only see the output when the test is done. But that's ok!

0

Please sign in to leave a comment.