Automating Postman tests with Newman
To automate the series of tests, in this section, we will export our to-do item Postman collection in the correct sequence. But first, we must export the collection as a JSON file. This can be done by clicking on our collection in Postman on the left-hand navigation bar and clicking the grayed-out Export button, as seen in the following screenshot:
Figure 9.9 – Exporting our Postman collection
Now that we have exported the collection, we can quickly inspect it to see how the file is structured. The following code defines the header of the suite of tests:
"info": { "_postman_id": "bab28260-c096-49b9-81e6-b56fc5f60e9d", "name": "to_do_items", "schema": "https://schema.getpostman.com /json/collection/v2.1.0/collection.json", ...