Running the Newman command line
After exporting the Postman configuration that we saw earlier, we will run the Newman utility on our local machine.
To execute Newman, go to the Terminal, then to the folder where the JSON configuration files are located, and execute the following command:
newman run DemoBook.postman_collection.json -e Local.postman_environment.json
The newman run
command takes the JSON file of the collection that we exported as an argument and a parameter, -e
, which is the JSON file of the exported environment.
Note
For more details about all the arguments of this command, read the documentation at https://www.npmjs.com/package/newman#newman-options.
Newman will execute the Postman requests from the collection we exported. It will also use the variables of the exported environment and will also perform the tests we wrote in the request.
The result of its execution, which is quite detailed, is shown in the following screenshot: