Cucumber not showing coloured output in windows
One of the dev's at my work figured it out.
You need to
- Download Ansicon from https://github.com/adoxa/ansicon/downloads and unzip it into a directory
with no spaces - Open a command prompt and cd to the folder where you unzipped it
- Now, cd into either x86 or x64 (depending on your machine’s processor) and install it globally on
your machine (For example, D:\Cucumber\ansi160\x64) - Type
ansicon.exe –i
ORansicon -i
and press Enter - Any program that prints ANSI colors will now display properly on your machine.
How do I get coloured output back for Cucumber in ConEmu?
Old build was used. Update to latest alpha.
Remove warning about ansicon from rake cucumber
You can actually remove the warning itself. I do not like installing a bunch of garbage just for the sake of having a green word. So, to remove the warning:
1. Locate the Cucumber installation in gems directory (it's in the Ruby installation directory). For me it was: lib\ruby\gems\1.9.1\gems\cucumber-1.2.0
2. In the cucumber-1.2.0\lib\cucumber\formatter directory of the Cucumber installation find the file ansicolor.rb
3. Locate the line:
STDERR.puts %{*** WARNING: You must use ANSICON 1.31 or higher (http://adoxa.110mb.com/ansicon) to get coloured output on Windows}
and add # in front of it to comment it out:
# STDERR.puts %{*** WARNING: You must use ANSICON 1.31 or higher (http://adoxa.110mb.com/ansicon) to get coloured output on Windows}
The line number was 14 for my version of Cucumber.
4. Save the file and you're done
Calabash no colors in output
I have not tried this, but I found this blog post that writes about the same problem http://qastuffs.blogspot.dk/2011/02/how-to-install-ansicon-for-cucumber-to.html
So it could be worth a try.
Copied from the blog
Anyway, here are the steps on how to install ansicon.exe:
- Download and unzip the file from https://github.com/adoxa/ansicon/downloads
- open cmd and navigate to the unzipped folder
- Navigate to x64 (if you have a 64 bit machine) otherwise navigate to x86
- Type ansicon.exe -h and you will get the following: 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 redirectedis one or two hexadecimal digits; please use "COLOR /?" for details.
5. Execute 'ansicon.exe -i' to install and add ansicon to your Windows
6. Run your cucumber 0.10.0 test and you should get the coloured output result on Windows
Related Topics
How to Require a Specific Version of a Ruby Gem
How to Get the Width of Terminal Window in Ruby
How to Sort a Hash by Value in Descending Order and Output a Hash in Ruby
Ruby - Bundle Install/Update Too Slow
Can't Use Compass After Installing It
Ruby Replace String with Captured Regex Pattern
Uninstall Ruby Version from Rbenv
How to Check If a Variable Is an Instance of a Class
Library Not Loaded: /Usr/Local/Opt/Readline/Lib/Libreadline.6.Dylib (Loaderror)
Rails Flash Message Remains for Two Page Loads
"Rmagick" Gem Installation Issue
Array.Include? Multiple Values
Can't Use Compass After Installing It
Rails 5.2 Active Storage Add Custom Attributes
Differencebetween a Process' Pid, Ppid, Uid, Euid, Gid and Egid