Is there a way to get coloured output on windows console when running tests from testNG? I'd like to quickly differentiate failed/passed tests through windows console which are logged using system.out.println() command. (I have other alternatives of this such as using ReportNG html report and all, but would like to see of possiblity of displaying some colors on windows console)
Here is what I've done.
1. Added Jansi library and able to display customized coloured output on windows console using Java console project.
eg. statement with Jansi library
System.out.println(ansi().fg(Color.YELLOW).a("this displays in yellow"));
When I ran this console project using Java, I could see the text displayed in yellow.
2. When implemented the same statement in TestNG project and run it with ant (this ant files simply runs testng.xml with "TestNG" target) file from commandline, everything sets to default and all I could see is white text on black screen.
Had anyone experienced this? Is there any workarounds for this?