Integrate Postman with Universal Agent

Getting Started

In this article you will learn how to integrate Postman with Universal Agent.

You will need the Newman command line tool, which is also known as Collection Runner for Postman, installed in the host machine where the Automation Host is running to kick off a Postman test in Universal Agent. If you're not familiar with Newman, refer to this article to learn more and how to install Newman to the host machine.

The sample Postman repository that you will use to configure in the Universal Agent is located at

The specific Postman collection you will execute with Newman is

Create Postman Universal Agent

  1. From Launch, open the host machine where you want to create the new agent.
  2. Select the + New Agent button.

  3. The New Agent dialog will
  4. Enter the information listed below to create the new agent.


General Agent Information


  • Agent Name: name of the agent, e.g. Postman Universal Agent
  • qTest Manager Project: select a qTest Manager project from which the agent is going to execute scheduled tests, e.g. qConnect Sample Project
  • Agent Type: Universal Agent

Pre-Execute Script

Enter the script below in the Pre-Execute Script editor, which is specific to the Operating System that the host is running.


if [ ! -d "/usr/local/var/postman-samples" ]
cd "/usr/local/var"
git clone
cd /usr/local/var/postman-samples
git pull --all


if not exist "D:\postman-samples" (
cd /d D:\
git clone
) else (
cd /d "D:\postman-samples"
git pull --all

Execute Command


  • If your host machine is running on Linux or Mac, select shell as the executor.
  • If your host machine is running on Windows, select batch as the executor.

Working Directory

  • If your host machine is running on Linux or Mac: enter /usr/local/var/postman-samples
  • If your host machine is running on Windows, enter D:\postman-samples

Execute Command

You will configure the Execute Command to execute our sample Postman collection with the Newman Command Line tool. 
Note: make sure you install newman to your host machine for the command to be executed successfully by Universal Agent.

Enter the command below in the Execute Command editor.

newman run "./sample-collection.json" --reporters cli,json --reporter-json-export "./results/sample-results.json" --suppress-exit-code --no-color

Path to Results

Optional field. Enter the value below to specify the path to the test result generated by the Newman tool.

  • If your host machine is running on Linux or Mac: /usr/local/var/postman-samples/results/sample-results.json
  • If your host machine is running on Windows: D:\postman-samples\results\sample-results.json

Result Parser

Optional field. Select Postman Json as the Result Parser.


  • If you want the Universal Agent to submit test results to qTest Manager, you must  specify values for both Path to Results and Result Parser. Otherwise, you must do that yourself via Execute Command.

The screenshot below shows how the new Postman Universal Agent is configured, on Mac.


Select SAVE to finish creating the agent. The agent will be available the next time the host machine polls to qTest Launch.

Execute Postman Universal Agent

  1. Access the host machine where the TestNG Universal Agent was created.
  2. Locate the agent in the Agents list and select the Run now button.
  3. The Universal Agent execution dialog will display.
  4. Select the Execute button to kick off the agent execution and you will see the logs shown in the Console Log section. If the execution is successful, you'll see the test run logs being submitted to qTest

Now you can access qTest Manager and schedule test execution for the newly created test runs with Postman Universal Agent.


Subscribe To Our Blog
Powered by Zendesk