/
Postman via Newman report

Our documentation site has been updated to AIO Tests Knowledge Base

Postman via Newman report

AIO Tests provides integration with Postman tests by allowing users to import their Newman generated JSON report via REST calls or with a custom newman reporter. Results can be updated for existing AIO Tests Cases by mapping automated cases or by creating new ones from the Newman results json file

Having the automated results reporting in AIO Tests, can help in having a holistic view of coverage of requirements (unit to manual to functional and end-to-end automated tests).

This article discusses how are API tests created and results of the tests uploaded to AIO Tests using Newman results.

Postman and Newman

Postman is an API platform for building and using APIs. It is also an API client that makes it easy for developers to design, mock, create, share, test and document APIs. With Postman, you can send requests to connect to APIs you are working with. Requests can retrieve, add, delete, and update data. Requests can send parameters, authorization details, and any body data that is required.

Newman is an open source command-line Collection Runner for Postman. It enables you to run and test a Postman Collection directly from the command line, making it possible to run API tests in continuous integration servers and build systems.

Newman Setup

  1. To run Newman, ensure that you have Node.js >= v10. Install Node.js via package manager.

  2. npm install -g newman or brew install newman

Execute Postman Collection via Newman

Postman requests and examples can be grouped into collections to keep a workspace organized, to collaborate with teammates, to generate API documentation and API tests, and to automate request runs.

  1. Create a Postman Collection. For details on creating Postman collections, please refer to Creating Collections and Adding Requests to Collections.

  2. Export the collection (Steps to Export). Exporting creates a collection.json file.

  3. Using the newman cli, run the collection
    newman run sample-collection.json

  4. Environments provide a set of variables that one can use within collections. If an environment file is required, then export the environment file and use it with newman run as follows:
    newman run mycollection.json -e env.json

Sample collection