Exporting the environments

We could stop there for Newman's configuration, but the problem is that our Postman requests use variables that are configured in environments.

It is, therefore, for this reason that we will also have to export the information from each environment in JSON format, so that we can also pass it on as an argument to Newman.

To export the environments and their variables, we perform the following tasks:

  1. We will open the MANAGE ENVIRONMENTS from settings in Postman.
  2. Then, click on the download environment button.

These steps are shown in the following screenshot:

So, for each environment, we will export their configurations in a JSON file, which we save in the same folder where we exported the collection.

Finally, we have a folder on our machine that contains three Postman JSON files:

  • One JSON file for the collection
  • One JSON file for the Local environment
  • One JSON file for the QA environment

The following screenshot shows the contents of the local folder that contains Postman's exports:

We have just seen the export of all the configurations of our Postman requests, including the collection and the environments, and we will now see the execution of the Newman command line.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.106.100