Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 我怎样才能得到纽曼&x27;直接在节点程序中生成json报告?_Node.js_Newman - Fatal编程技术网

Node.js 我怎样才能得到纽曼&x27;直接在节点程序中生成json报告?

Node.js 我怎样才能得到纽曼&x27;直接在节点程序中生成json报告?,node.js,newman,Node.js,Newman,我发现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 => {

我发现
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
中的
回调(err,summary)
是我需要的