使用protractor-cucumber-framework
如何修改CucumberJs的控制台输出,该输出将在运行时输出步骤。
功能中的示例场景:
Given that Home Page is Displayed
When I Click Sales Button at Home Page
Then Sales Page is Displayed
运行测试时,应输出ff。在控制台中。
Given that Home Page is Displayed - Passed
When I Click Sales Button at Home Page - Passed
Then Sales Page is Displayed - Passed
答案 0 :(得分:1)
更改量角器conf.js,以在cucumberOpts
中指定格式器,如下所示:
exports.config = {
cucumberOpts: {
format: [require.resolve('cucumber-pretty')]
}}
}