Skip to content
This repository has been archived by the owner on Jun 6, 2018. It is now read-only.

Latest commit

 

History

History
38 lines (27 loc) · 1.89 KB

README.md

File metadata and controls

38 lines (27 loc) · 1.89 KB

newman_ubuntu1404

This image runs newman 3.0.0 on node 4.3.0 on Ubuntu 14.04.2

Build the image,

docker build -t postman/newman_ubuntu1404 .

Or get it from docker hub

docker pull postman/newman_ubuntu1404:3.0.0

then run it

docker --volume="/home/postman/collections:/etc/newman" -t postman/newman_ubuntu1404 --collection="JSONBlobCoreAPI.json.postman_collection" --html="newman-report.html"

For newman-docker to be able to use collections and environment files saved on the host machine, and to save reports generated by newman, a directory containing the collection and environment needs to be mounted on to the docker instance on run time, preferably at /etc/newman, which is the default working directory. If you mount to a different location, then

  • You can either pass the full path to your collection and environment files to newman. For instance, if you mount to /var/newman,
docker --volume="/home/postman/collection:/var/newman" -t postman/newman_ubuntu1404 --collection="/var/newman/JSONBlobCoreAPI.json.postman_collection" --html="/var/newman/newman-report.html"
  • You can change the working directory while running the image to the location you mounted to, using the -w or --workdir flag.
docker run --volume="/home/postman/collections:/var/newman" --workdir="/var/newman" -t postman/newman_ubuntu1404 --collection="JSONBlobCoreAPI.json.postman_collection" --html="newman-report.html"

In case you don't need to save newmans report to the host, and your collection is available online and it does not require any environment, then you can forgo mounting your collections directory, and directly pass the collection url to newman

docker run -t postman/newman_ubuntu1404 --url="https://www.getpostman.com/collections/df0a40ef41d570c48154"