1
我正在运行量角器黄瓜测试并尝试使用量角器多重cucumber-html-reporter-plugin生成报告。浏览器立即在量角器黄瓜测试中关闭,当使用cucumber作为Json
但是,当我在配置文件中使用格式:json:result.json时,浏览器(chrome)在测试开始运行时立即关闭,并显示报告中传递的所有测试用例。
但我写了这样的情况下,一些测试用例应该失败。这只发生在我使用格式:json:result.json在cucumberOpts。
当我使用format:'pretty'时,浏览器正常工作,它显示所有测试用例的运行情况,并且它显示正确数量的测试用例已通过并失败。
请找我的配置文件
const path = require('path');
exports.config = {
directConnect: true,
framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
cucumberOpts: {
require: [
'maths.js',
],
// Tell CucumberJS to save the JSON report
format: 'json:.tmp/results.json',
strict: true
},
specs: [
'*.feature'
],
multiCapabilities: [{
browserName: 'chrome',
shardTestFiles: true,
maxInstances: 2,
chromeOptions: {
args: ['disable-infobars']
}
}],
// Here the magic happens
plugins: [{
package: 'protractor-multiple-cucumber-html-reporter-plugin',
options:{
automaticallyGenerateReport: true,
removeExistingJsonReportFile: true
}
}]
};
黄瓜什么版本您使用的? – Razvan
黄瓜1.3.2。我也尝试过黄瓜2 – doe
你可以添加一些步骤定义吗?我认为问题在于你已经实施了这些步骤。 – Razvan