follow me icons

Saturday, October 30, 2010

How to get Colour in JRuby for window

I have to use JRuby to run my cucumber automation from ruby recently since the developers are using ant to run the build. So I was able to setup the automation code to use JRuby. However, I had issue in running my test using JRuby since it does not give a nice cucumber colour onto my command prompt screen.

After looking around, I found out that I need to install WAC.exe, Windows ANSI Color, on my Windows machine.

All I need to do is to download wac.exe and put it in my PATH variables.

Before



D:\code\> ant cucumber -Dtest.env=production

[java] ←[32mGiven I am on the google homepage←[90m
0m
[java] ←[31mAnd I search for "←[31m←[1m222 selenium webdriver←[0m←[0m←[31m" ←[90m
main_steps.rb:79←[0m←[0m
.
.
.
.


After: WAC.exe is able to interpret the ansi color


D:\code\> ant cucumber -Dtest.env=production | wac

[java] Given I am on the google homepage
[java] And I search for "Selenium Webdriver"
[java] When I click on the go button
.
.
.
.

No comments:

Post a Comment