问题描述
我发现newman
的文档仅描述了有关将报告输出到CLI或文件的描述。当我在node.js中使用newman
库时,是否可以直接获取报告json?
newman.run({
collection: new Collection(collection),reporter: ['json'] // Can I insert a callback function receiving json report here?
},err => {
// ...
});
解决方法
它在回调函数中。
我需要summary
中的 callback (err,summary)
。