使用 newman 运行集合时出现错误“getaddrinfo ENOTFOUND {{url}}”

问题描述 投票:0回答:1

我是 Newman 包执行和邮递员集合的新手。我已完成以下步骤来使用 Newman 包运行邮递员集合,但出现错误

POST http://localhost:3000/login [errored]
connect ECONNREFUSED 127.0.0.1:3000
JSONError in test-script"

我有一个包含一些 API 的集合,它从环境集合中读取 URL 值 url 和值 http://localhost:3000

用于运行集合的命令:

Newman run collection_name.json -e environment_collection.json

enter image description here

请您多多指教

automation postman postman-collection-runner newman postman-newman
1个回答
0
投票

重新设计你的收藏,看起来有问题。 检查环境文件和集合映射。

您能解决这个问题吗?

© www.soinside.com 2019 - 2024. All rights reserved.