在Eclipse Juno中运行。
@RunWith(Cucumber.class)
@Cucumber.Options(format={"pretty", "html:target/cucumber"})
public class RunTests {
}在控制台窗口中,我看到:
Feature: Depositing money
Scenario: Sunny day [90m# deposit.feature:3[0m
Given: I have an Account with a balance of $100
When: I deposit $20
Then: The Account balance should be $120问:[90m#和3[0m是关于什么的?
在target/cucumber/index.html中,我看到:
Feature: Depositing money
Scenario: Sunny day
Given: I have an Account with a balance of $100
When: I deposit $20
Then: The Account balance should be $120我假设如果我在一个没有步骤定义的新特性上运行测试,cucumber-jvm将输出步骤的框架定义,我可以将这些定义从控制台窗口复制到一个java文件中。这不是这样的吗?
发布于 2013-04-24 21:56:15
Cucumber应该在控制台窗口中提供步骤定义框架。您是否尝试过从您的终端运行它们?
问题:[90m#和3[0m是关于什么的?
这些都是编码以提供颜色。可能是因为你使用了PrettyFormatter。
发布于 2017-12-30 16:54:45
如果你使用'--monochrome‘选项运行,你将不会得到奇怪的格式[90m# deposit.feature:3[0m。您可以在@CucumberOptions中设置单色= true,也可以在命令行中使用--monochrome进行设置
https://stackoverflow.com/questions/15670480
复制相似问题