Cucumber not showing coloured output in windows

心已入冬 提交于 2019-12-20 08:59:33

问题


this is probably something really stupid but I can't work it out.

I upgraded my version of cucumber to v 0.10.0 and now the test's (running on Win 7) are not showing coloured output with the "pretty" formatter.

When tests are run it prints this error: *** WARNING: You must use ANSICON 1.31 or higher (http://adoxa.110mb.com/ansicon) to get coloured output on Windows

I have been to http://adoxa.110mb.com/ansicon but it's not obvious to me how I should be upgrading it. Anyone know how to upgrade my version of anscion?


回答1:


One of the dev's at my work figured it out.

You need to

  1. Download Ansicon from https://github.com/adoxa/ansicon/downloads and unzip it into a directory
    with no spaces
  2. Open a command prompt and cd to the folder where you unzipped it
  3. 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)
  4. Type ansicon.exe –i OR ansicon -i and press Enter
  5. Any program that prints ANSI colors will now display properly on your machine.



回答2:


Update as of today, http://adoxa.110mb.com/ansicon is no longer accessible. Files have been uploaded to https://github.com/adoxa/ansicon/downloads.

I tried downloading from adoxa.3eeweb.com, but Chrome warned me that the file was "not commonly downloaded and could be dangerous."

So I opted with the file from github.

Besides that, I just followed the steps mentioned above and my output is now coloured.



来源:https://stackoverflow.com/questions/4746647/cucumber-not-showing-coloured-output-in-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!