N5ken's technical blog

Just another WordPress.com site

Install ansicon for cucumber to get coloured output on Windows

Today, I use Cucumber 1.0.1 for my testing on Windows 7, it runs quite good except the problem of the output color, this because Windows do not support colored output in command line prompt, however, we still have a solution, that is ANSICON, you can find it in http://adoxa.110mb.com/ansicon/ and download the latest version and follow the steps below to complete your installation:

1. Download and unzip the latest file from http://adoxa.110mb.com/ansicon
2. Open cmd and navigate to the unzipped folder
3. Navigate to x64 (if you have a 64 bit machine) otherwise navigate to x86
4. Execute ‘ansicon.exe -i’ to install and add ansicon to your Windows
5. Run your cucumber 0.10.0 test and you should get the coloured output result on Windows 😉
6. For more information of the options, you can type ‘ansicon.exe -h’ for help

D:\Data\ansicon\x86>ansicon.exe -h
ANSICON by Jason Hood .
Version 1.32 (22 December, 2010).  Freeware.
http://ansicon.adoxa.cjb.net/

Process ANSI escape sequences in Win32 console programs.

ansicon -i|I | -u|U
ansicon [-m[]] [-p | -e|E string | -t|T [file(s)] | program [args]]

  -i            install - add ANSICON to the AutoRun entry (implies -p)
  -u            uninstall - remove ANSICON from the AutoRun entry
  -I -U         use local machine instead of current user
  -m            use grey on black ("monochrome") or  as default color
  -p            hook into the parent process
  -e            echo string
  -E            echo string, don't append newline
  -t            display files ("-" for stdin), combined as a single stream
  -T            display files, name first, blank line before and after
  program       run the specified program
  nothing       run a new command processor, or display stdin if redirected

 is one or two hexadecimal digits; please use "COLOR /?" for details.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: