Install ansicon for cucumber to get coloured output on Windows
July 13, 2011
Posted by on
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
ANSICON by Jason Hood .
Version 1.32 (22 December, 2010). Freeware.
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.