Newman library get request Error: getaddrinfo ENOTFOUND {{url}}{{basepath}}

I work for Postman, which created Newman so…yes, I’m associated with it. :grin:

You cannot access Postman variables (which in this context are values in a JSON file) directly in that script, without reading the JSON file in someway to extract the data.

I believe there is a lack of JS/node knowledge happening here and what can and cannot be achieved within a node script.

The dotenv module is something that can be used alongside Newman as a library to abstract the way you reference certain config details.

The URL as a string would just be exactly what you’re doing with that URL to read the Collection file from the Postman API. That data set doesn’t need to come from the API, those can come from any public API that returns the environment values in that format.

This provides example of how you could reference variables in that newman run object:

Take a look at the Newman repo and raise these gaps on there, it’s a more targeted place that a thread on the community forum. It will be easier to group certain issues together as this thread is getting slightly pulled in multiple directions.