gpt4 book ai didi

node.js - Postman Newman 使用node.js时如何配置 "options"

转载 作者:行者123 更新时间:2023-11-28 21:18:20 25 4
gpt4 key购买 nike

我已经创建了一个简单的 newman reast 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 时配置选项?

最佳答案

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);

关于node.js - Postman Newman 使用node.js时如何配置 "options",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55005711/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com