loopDelicious / docker-extension

Docker Desktop extension using Postman's Newman to run collections
22 stars 11 forks source link
docker docker-extension hacktoberfest postman

Postman Docker extension

This Docker Desktop Extension runs Postman collections using Postman's open-source CLI, Newman image and Danny Dainton's HTMLextra reporter. Run your API tests or execute an API workflow in any server environment. Then review the results of the collection run.

Newman run results

How it works

Install the Docker Desktop Newman extension: https://hub.docker.com/extensions/joycelin79/newman-extension

Read the blog announcement

Automate API Tests and Debug in Docker With Postman’s Newman Extension

Watch the demo

Postman Docker extension demo

For local development

Pre-requisites

This extension is not published yet, so build and deploy it locally from source code.

Clone the project

Run:

git clone https://github.com/loopDelicious/docker-extension.git

Change into the project directory

Run:

cd docker-extension

Build and install the extension

Run:

make && make install

Build the HTML reporter

Change into the HTML reporter directory:

cd htmlreporter-with-template

From inside the subdirectory, build the reporter image:

docker build -t joycelin79/htmlreporter-with-template:latest .

Developing the frontend

In your terminal, run individually one-by-one:

cd ..
cd client
npm install
npm start

This starts a development server that listens on port 3000.

You can now tell Docker Desktop to use this as the frontend source. In another terminal, run:

docker extension dev ui-source joycelin79/newman-extension:latest http://localhost:3000

In order to open the Chrome DevTools for your extension when you click on the extension tab, run:

docker extension dev debug joycelin79/newman-extension:latest

Code of Conduct

Everyone is welcome to contribute to this project. Please follow the Postman Code of Conduct, and don't be a jerk.