【问题标题】:Postman Newman how to configure "options" using when using node.jsPostman Newman 使用 node.js 时如何配置“选项”
【发布时间】:2019-07-27 02:12:14
【问题描述】:

我创建了一个简单的 newman REST API 测试调用,我还想为我的调用使用一些选项。

const newman = require('newman');
console.log("hello");

newman.run({
    collection: 'https://www.getpostman.com/collections/4a6098a183ea90b7d8d7',
    reporters: ['cli', 'html'],
    options:'-k' //<--- *** This does not work ***
}, process.exit);

我的情况是我使用的选项是 -k(禁用 SSL 验证检查并允许自签名 SSL 证书。),我的问题一般是在 node.js 中使用 newman 时如何配置选项?

【问题讨论】:

    标签: node.js rest testing postman newman


    【解决方案1】:

    postman newman api 参考:https://www.npmjs.com/package/newman#api-reference

    newman.run({
        collection: 'https://www.getpostman.com/collections/4a6098a183ea90b7d8d7',
        reporters: ['cli', 'html'],
        insecure:'true' //<--- will set option -k
    }, process.exit);
    

    【讨论】:

      猜你喜欢
      • 2019-04-11
      • 2016-04-02
      • 1970-01-01
      • 2022-01-19
      • 2018-05-26
      • 2018-10-10
      • 1970-01-01
      • 2021-08-17
      • 2019-12-06
      相关资源
      最近更新 更多