我正在使用 Newman 来执行 POSTMAN 集合,但我总是遇到错误“连接 ETIMEDOUT”。仅使用 POSTMAN 可以正常工作,但不能使用 NEWMAN。测试很简单,在服务器上创建一个内容 https://jsonblob.com/api
我正在关注教程 http://blog.getpostman.com/2014/04/17/how-to-write-automated-tests-for-apis-with-postman-part-2/
非常感谢你提前。我把集合和环境文件放在下面。
这是集合: {“id”:“a6a6b2fe-db11-4c57-9144-6b3324174f18”,“name”:“Newman”,“values”:[{“key”:“url”,“value”:“ https ://jsonblob.com ", "enabled": true, "type": "text" }, { "key": "deviceMapping", "value": "{\n \"content\": \"我的第一个博客文章 :)\"\n}", "enabled": true, "type": "text" }, { "key": "blogLink", "value": " https://jsonblob.com/api/ jsonBlob/b7f2ce87-4c8e-11e8-917b-9137e61d314b ", "启用": true, "类型”:“文本”}],“_postman_variable_scope”:“环境”,“_postman_exported_at”:“2018-04-30T16:13:07.630Z”,“_postman_exported_using”:“Postman/6.0.10”}
这是环境文件: { "id": "a6a6b2fe-db11-4c57-9144-6b3324174f18", "name": "Newman", "values": [ { "key": "url", "value": " https://jsonblob.com ", "enabled": true, "type": "text" }, { "key": "deviceMapping", "value": "{\n \"content\": \"My第一篇博文 :)\"\n}", "enabled": true, "type": "text" }, { "key": "blogLink", "value": " https://jsonblob.com/api /jsonBlob/b7f2ce87-4c8e-11e8-917b-9137e61d314b ", "启用": true, "类型”:“文本”}],“_postman_variable_scope”:“环境”,“_postman_exported_at”:“2018-04-30T16:13:07.630Z”,“_postman_exported_using”:“Postman/6.0.10”}