Newman with Docker

This topic describes how to use Newman with Docker in these platforms:

macOS and Ubuntu

Follow these steps to use Newman with Docker:

1. In the Docker Hub, download your copy.

2. Ensure you have Docker installed and running in your system. Docker has extensive installation guidelines for popular operating systems. Choose your operating system and follow the instructions.

To test your Docker installation, execute this command to ensure it runs without errors:

$ docker run hello-world

3. Pull the Newman docker image.

$ docker pull postman/newman;

4. Run Newman commands on the image.

$ docker run -t postman/newman run ""

The URL is a shareable public link to your collection. You can get this by clicking View more actions on a collection, choose Share collection and then click Get public link.

At this stage, you should see the Collection running in Newman and the output displayed in the terminal.

The entry point to the Docker image is Newman. So you can use all Newman command-line parameters. You can also run locally stored collection files. The README of the image outlines how to mount shared data volumes.


Check out how to run Newman in Docker for Windows.

For more information on collection runs, see:

Last modified: 2021/09/23