node.js - 如何在节点程序中直接获取 newman 的 json 报告?
问题描述
我发现newman
的文档仅描述了将报告输出到 CLI 或文件。newman
当我在node.js中使用库时,有没有办法直接获取报告json ?
newman.run({
collection: new Collection(collection),
reporter: ['json'] // Can I insert a callback function receiving json report here?
}, err => {
// ...
});
解决方案
它在回调函数中。
summary
是callback (err, summary)
我需要的。
推荐阅读
- javascript - 为什么我需要两次调用 setPageFromHash() 方法?
- android - CalendarView 显示最小日期为今天
- scala - 如何从 Source[ByteString, Any] akka 流中实现 2 个参数
- sql - MS Access 2016 - 在复杂查询中从单独的表中提取客户端名称
- python - 如何将不同数据框中的多列与 Pandas 进行比较
- c# - c#如何在get属性中使用模板?
- php - Codeigniter - 我如何对多列求和
- android - 如何使用 Dagger2 在 Fragment 中注入 BroadcastReceiver 对象的创建?
- odoo - 使用 Odoo 外部 API 中的自定义字段更新数据
- c# - 在 c# 中使用 kernel32.dll 缩短长文件路径名