【发布时间】:2017-10-10 23:37:39
【问题描述】:
我正在使用 newman 和 postman 运行一套 postman 请求和相关的测试脚本。
我有一个环境变量,它是一条我无法存储在磁盘上的敏感信息(因此我无法在 JSON 测试文件中声明它)。我需要有一些简单的方法将其传递到测试中。
我想在运行测试时在命令行上为环境变量分配一个值作为参数。
我像这样运行测试:
newman run c:\path\to\test.json
我想做这样的事情:
newman run c:\path\to\test.json passwordEnvVariable=mypassword
这样的事情可能吗?
【问题讨论】:
标签: javascript json http testing postman