You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Gili (JIRA)" <ji...@apache.org> on 2017/05/02 03:56:04 UTC

[jira] [Created] (SUREFIRE-1369) No way to output ANSI colors when running under Surefire

Gili created SUREFIRE-1369:
------------------------------

             Summary: No way to output ANSI colors when running under Surefire
                 Key: SUREFIRE-1369
                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1369
             Project: Maven Surefire
          Issue Type: Improvement
          Components: Maven Surefire Plugin
    Affects Versions: 2.20
         Environment: Windows 10 64-bit, 10.0.14393
            Reporter: Gili


I invoke the following native code from inside a unit test:

{{GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &sbi)}}

It fails with {{GetLastError() == ERROR_INVALID_HANDLE}} indicating that stdout has been redirected.

I am blocked by the fact that it isn't possible to use ANSI colors under Windows when stdout has been redirected. I tried configuring Surefire with:

{code}
	<forkCount>0</forkCount>
	<redirectTestOutputToFile>false</redirectTestOutputToFile>
	<useFile>false</useFile>
	<printSummary>false</printSummary>
{code}

but stdout is still getting redirected. Is it possible to configure Surefire to use the default stdout (connected to a terminal) without redirection?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)