- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 HTML 报告器安装和运行 Postman 的 Newman 测试集合(在带有来自 Postman 帐户的 docker 图像的 jenkins podTemplate 容器上)但它一直失败,因为找不到合适的 Newman 版本:
"npm WARN newman-reporter-htmlextra@1.19.6 requires a peer of newman@>=4 but none is installed. You must install peer dependencies yourself"
Newman 图像 docker 是“ postman / Newman :5.2- Alpine ”。
sh "newman run tests/collection.json -r htmlextra --reporter-htmlextra-export var/reports/newman/html/index.html";
我也尝试安装(“sh”前缀是因为它在 groovy 脚本中..在 Jenkins 中):
sh "npm install -g newman@4.6.1"
sh "npm install -g newman-reporter-htmlextra"
然后执行与上面相同的运行命令。
sh "newman run tests/collection.json -r htmlextra --reporter-htmlextra-export var/reports/newman/html/index.html";
但结果是一样的。
Using htmlextra version 1.19.6
Created the htmlextra report in this location: var/reports/newman/html/index.html
但随后以 FAILURE 退出脚本/作业。
最佳答案
那是一个 npm 错误,https://github.com/npm/npm/issues/12905
对于 newman-reporter-htmlextra , newman 是对等依赖项。
在 npm 中,如果依赖项和包没有一起安装,则不会检测到全局包的对等依赖项
在这种情况下,您可以通过使用将其安装在一起来修复它
npm install -g newman newman-reporter-htmlextra
尝试 :
podTemplate(label: "newmanPodHtmlExtra", containers: [
containerTemplate(name: "newman", image: "dannydainton/htmlextra", command: "cat", ttyEnabled: true),
]) {
node("newmanPodHtmlExtra") {
def testsFolder = "./tests";
container("newman") {
stage("Checkout") {
checkout scm;
}
try{
stage("Install & run Newman") {
sh "npm install -g newman newman-reporter-htmlextra";
sh "newman run ${testsFolder}/collection.json -r htmlextra --reporter-htmlextra-export var/reports/newman/html/index.html";
}
}catch(e){}finally{
stage("Show tests results") {
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'var/reports/newman/html', reportFiles: 'index.html', reportName: 'API Tests', reportTitles: ''
])
}
}
}
}
}
关于docker - Newman htmlextra 记者提示 Newman 丢失但已安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65398954/
这个问题在这里已经有了答案: How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning
当使用 ReporteRs 包时,我想创建一个完全横向的文档。当我尝试使用 addSection(doc, landscape = TRUE) 函数执行此操作时,第一页输出为空白纵向页面。我怎样才能避
我正在尝试在我的项目中进行一些测试,但是这个异常停止了我的工作。我只是重构了2个类的名称,然后就出现了这个异常。 这是我的异常(exception): java.lang.IllegalStateEx
我找不到如何使用 jasmine 框架更改 Protractor 运行器中的记者样式。 我现在拥有的是: 但我想要更多类似的东西: 有没有办法为 jasmine 添加自定义报告器,以显示当前正在运行的
我在将 junit 记者添加到 wdio.conf.js 时遇到问题。 每当我尝试实现任何记者时,我都会得到以下输出并且我的测试失败了: ERROR @wdio/local-runner: 2019-
我尝试使用在 上找到的 allure 记者 Allure reporter 我创建了运行者: const createTestCafe = require('testcafe'); let testc
我想在 TeamCity 上运行 Istanbul 尔覆盖范围的测试,并将测试结果报告回“测试”选项卡。我运行以下命令: node --harmony C:\...\node_modules\ista
使用 teamcity、requirejs 和运行 phantomjs.exe 的 jasmine 1.3 构建了一个有效的 CI,我正在尝试将 jasmine 升级到 2.0 版。 在这篇精彩的文章
我正在使用 Protractor (0.22.0) 来测试我的应用。这可能有一个 Mocha 式记者而不是基本的 Jasmine 式记者吗?目前看起来像这样: (....F...) 我看起来更像: m
你好, 我的 Mocha 配置有问题。我有应该由 Babel 编译的 ES6 代码,然后我想覆盖这个 ES6 代码(以 LCOV 格式)。 我解决这个问题的方法是使用 mocha、mocha-lcov
我们正在编写一个基于 Backbone.js 的应用程序,并尝试将我们的 Mocha 测试与我们的 Jenkins 结合使用持续集成服务器。 到目前为止,我可以使用类似 Testem 的方式运行测试或
当我运行 grunt test 并且没有给我预期的结果时,我得到以下警告,这是写单元测试的进度。 错误:- Running "karma:unit" (karma) task WARN [report
我是一名优秀的程序员,十分优秀!