Colored console output in Unit Test Runner

i.e. I have a test:

[Test]
public void DoSomeOutput() {
     Console.ForegroundColor = ConsoleColor.Red;
     Console.Write("Some Red Message");
}

When I run it - I can see output in test runner but it is not colored.
Should I submit feature request for that or there is another way of making this work?

8 comments

Hello Sergei,

please submit feature request in our issue tracker: http://youtrack.jetbrains.net/

You were seconds faster than me. Thanks for submitting an issue.

Right now there is no workarounds to get coloring in output.

0

This is sooo long ago but has this been added yet?

0

Hello,

This is sooo long ago but has this been added yet?


I'm not sure it would be. We're captuing the stdout stream out of the test
runner process to display in the output panel, and this stream has no color
information in it. Probably means implementing a console emulator? I don't
know of Windows apps that would do it, even PowerShell won't show colored
output.


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0

PowerShell let's you set the colour of the text using the -foregroundcolor parameter when calling Write-Host.

0

Hello,

PowerShell let's you set the colour of the text using the
-foregroundcolor parameter when calling Write-Host.


This isn't directly related to the matter. Test runner's own output is colored
just good, and so are stack traces in exceptions.

A closer example would be running MSBuild inside Power Shell ISE. All of
its coloring is lost.
Probably it's theoretically possible, but I haven't really seen this done.


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0

The output window also contains stack trace information if an error occurred, and this is rich-formatted, complete with links back into the code.  This needs to happen.

0

Please sign in to leave a comment.