javascript - 有没有办法添加标签,浏览器量角器正在测试以显示在报告上?
问题描述
我在詹金斯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/',
});
}
}
解决方案
推荐阅读
- python-3.x - 无法覆盖詹金斯管道中的python命令
- three.js - three.js 如何以编程方式从数据集中生成平面
- python - 我想从应用程序中抓取所有元素,但我遇到了 selenium python 问题
- multithreading - 如何使用锁定例程和睡眠功能来摆脱同步的显式障碍?
- sql-server - 将 AND (x OR y) 添加到视图的现有 where 子句不起作用
- angular - 带有参数的数组中的打字稿/角度删除/拼接对象
- python - 在 Tensorflow 2.0 中检查张量的值
- python - 无法在 Windows 上为 Py 3.7 安装 pycurl
- reactjs - CreateContext 挂钩不允许渲染任何其他组件
- docker - 删除 .../docker/overlay2 目录下的孤立文件夹(哈希)是否安全