我正在使用JRuby 1.6.3和Cucumber 1.0.2。当我运行我的功能(jruby -S cucumber features \ add_two_numbers.feature)时,我得到了:
Feature: Add two numbers
In order to add not have to use my head
I want to add two numbers
Scenario: Add two numbers←[90m # features\add_two_numbers.feature:7←[0m
←[32mGiven I have a calculator←[90m # features/steps/calculator_steps.rb:11←[0m←[0m
←[32mWhen I add the numbers ←[32m←[1m1←[0m←[0m←[32m and ←[32m←[1m2←[0m←[0m←[32m←[90m#features/steps/calculator_steps.rb:18←[0m←[0m
←[32mThen I get ←[32m←[1m3←[0m←[0m←[32m←[90m # features/steps/calculator_steps.rb:25←[0m←[0m
1 scenario (←[32m1 passed←[0m)
3 steps (←[32m3 passed←[0m)
0m0.043s
输出中带箭头和方括号的数字是多少? 我如何摆脱它们?
答案 0 :(得分:1)
这些代码在输出中启用了颜色,但看起来您的系统由于某种原因不支持它们。您可以使用--no-color选项禁用它。
答案 1 :(得分:0)
使用此--monochrome
代替--no-color
对于ant build jvn arg,添加如<arg value="--monochrome"/>
否则使用@CucumberOptions("--monochrome")