Using Color in Test Reports

If you want to introduce colorization into your test output, you can use the -diagnostics-color command line option or the MFUNIT_COLORS environment variable. These options embed Select Graphic Rendition (SGR) substrings within the output, which when viewed using a supported terminal emulator display color.

Set either of these options to one of the following supported emulations when running a test suite:

Windows10
Only use this option on Windows 10 platforms. It activates a new terminal mode that allows the use of VT terminal sequences to be used in a Windows command prompt.
ansi
Use on all non-Windows 10 platforms. On Windows, you need to use a third-party terminal emulator that includes ANSI/SGR escape code support. On UNIX/Linux platforms, this support is in-built.
Jenkins
Use this option when associating JUnit-style reports with tests on a Jenkins CI server. Your server must have the AnsiColor plugin active in order to interpret the escape sequences embedded in the reports.

These values will give a standard colorization (foreground color only), but you can choose from a greater range of colors when using the MFUNIT_COLORS variable by appending additional values to the emulations given above; for example, the following value uses the ansi mode, and displays all pass information in the output with the foreground color magenta:

set MFUNIT_COLOR=ansi:ps=35

Each additional pair of values is delimited by a colon (:). Refer to Test Results Color Coding for available values.