我正在对詹金斯https://github.com/damianszczepanik/cucumber-reporting使用黄瓜报告。我正在使用不同的浏览器运行并行测试。我的报告如何显示哪个浏览器发生故障?我可以以某种方式在功能中添加@ firefox,@ ie,@ safari,@ chrome之类的标签吗?如何链接它们?
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
getPageTimeout: 600000,
allScriptsTimeout: 500000,
defaultTimeoutInterval: 30000,
framework: 'custom',
// path relative to the current config file
frameworkPath: require.resolve('protractor-cucumber-framework'),
multiCapabilities:
[
{
'browserName': 'safari'
},
{
'browserName': 'internet explorer'
},
{
'browserName': 'chrome'
},
{
'browserName': 'firefox'
}],
// Spec patterns are relative to this directory.
specs: [
'features/*.feature'
],
baseUrl: 'http://localhost:8080/',
ignoreSynchronization: true,
cucumberOpts: {
strict: true,
require: [
'hooks/reporter/js',
'specs/*Spec.js'
],
tags: ["runThis", "~ignoreThis"],
profile: false,
format: 'json:e2e/reports/cucumber-report.json',
resultJsonOutputFile: 'e2e/reports/cucumber-report.json'
},
onPrepare: function() {
var chai = require('chai');
chai.use(require('chai-as-promised'));
global.expect = chai.expect;
global.baseURL = this.baseURL;
browser.ignoreSynchronization = true;
browser.driver.manage().window().maximize();
browser.waitForAngular();
browser.driver.manage().timeouts().implicitlyWait(30000);
},
onComplete: function() {
const report = require('multiple-cucumber-html-reporter');
report.generate({
jsonDir: 'e2e/reports/',
reportPath: 'e2e/reports/',
});
}
}