Running Postman collections in CLI newman error - getaddrinfo ENOTFOUND {{base_url}}

Hello,
I have written test cases for API collections in postman and trying to run those through Newman plug-in in my local machine. I have downloaded the JSON file in documents on my mac

I am using this command to run : newman run QA_api_testing.postman_collection.json

getting below error with all the api’s failing
error message: GET {{base_url}}/companies/active/all [errored]
** getaddrinfo ENOTFOUND {{base_url}}**

pls help me

@joint-operations-ar4 Welcome to the community :partying_face:

Seems like you have used variables for storing “base_url”, if it’s a collection variable it will exported along with the collection json. But if you are using environmental or global variables, you need to export them manually and pass the file along with the comment. Refer here for more details.

Hi @bpricilla: Thanks for the response. I don’t have a dedicated QA server here. I duplicated the whole collection from dev server, named it differently, and wrote test cases for that collection.
running that collection in a staging environment(dev) . It works fine when I run the collection in postman. gives error when I run with Newman CLI. I’ll try as you suggested.