首页 > 解决方案 > 我无法从 html-reporter-extra 导出自定义报告名称

问题描述

这真的应该很简单,但我无法让它工作。这是一个简单的设置:我有一个本地运行的 Jenkins,导出了我正在使用 newman 运行的 Postman 集合。我安装了 html-report-extra,它正在生成报告,但我无法让它以不同的名称导出 html 文件!我有一个本地安装的 Jenkins,我正在使用一个自由式项目,在 Build - Execute Windows 批处理命令下我有这个:

newman run IDMS4.postman_collection.json -e IDMS4.postman_environment.json --reporters cli,htmlextra --reporter-html-export newman/index.html --disable-unicode

这就是我的 Jenkins 工作的设置方式: Jenkins 工作设置

构建完成,但任何地方都没有 index.html。这是让我困惑的部分。在

.jenkins\jobs\Newman 亚军\htmlreports\HTMLReport

我得到默认的文件格式名称(项目名称+时间戳)。在

.jenkins\workspace\Newman 亚军\newman

我还获得了项目名称 + 时间戳 html 文件。

为什么这会输出到两个文件夹,我怎样才能让它只导出一个 index.html?

标签: windowsjenkinsnewman

解决方案


请尝试使用点斜线。 例如: ./newman/index.html。

如果您需要在报告中包含集合名称,请使用以下节点模块

https://www.npmjs.com/package/jaiman


推荐阅读