Write to local file system using a postman collection

There are situations when you want to write the API response on local file system. So here I am explaining how to do that. Basically there are two ways to do it. One is by using node js scrip and another way to start a local server which accepts postman requests. Here I am explaining first method only. Ensure that you have node and npm installed. Install newman with: npm install newman. Create a file with the following contents: Here is another example:

Newman – Command line integration with Postman

To run the test from command line window, Postman has newly npm Package (Newman). Here quick steps to start with newman: Install latest version of Node (Node.js) in the computer. Download the Windows installer from the js® web site. To see if NPM is installed, type npm -v in command prompt. In case npm is already installed and want to update (To run Newman, ensure that you have NodeJS >= v4) run following command from cmd: npm install -g npm-windows-upgrade Set the path of Node Bin Folder (ex: C:\Program Files\nodejs\node_modules\npm\bin) in the Computer path Variable. Open the cmd and type following command “npm install -g newman”. It will install Newman in the PC. Postman provides a feature to download the collection as JSON Data. Download the collection from the Postman Open the command window in the downloaded path of collection and type following Command “newman run GetBalanceService.json -r html” Observe… Read more“Newman – Command line integration with Postman”

Postman Collections and organizing test using collections

A Postman Collection allow you to group together several APIs that might be related or perhaps should be executed in a certain sequence. You can organize these requests in folders as well. Basically collections server 4 purposes: Organization of tests, Documentation, Test Suit creation, and designing conditional workflows.  How to create collection Collections can be created by following two processes. One, while saving any request it shows option to create collection and/or folders. As per need one can created and organization those. Another way to create collection by using sidebar New Collection button or New Button at toolbar. While creating the collection it shows option to select authorization type, any pre-request script, any variable or any test script. Features of Collection Postman allows drag and drop feature to reorder and organize requests and folders. By using sub folders levels can be created and description can be added while will reflect… Read more“Postman Collections and organizing test using collections”