Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Project Gist - Google Summer of Code'21

Newman Dashboard

Built during Google Summer of Code' 21 for Postman

Student : Manan Sharma
Mentors: Utkarsh Maheshwari, Shivangi Bajpai

Table of Contents

About Me

I am a full stack web developer, currently pursuing my undergrad in Computer Engineering from Delhi Technological University, India.

I am passionate about good design and software. I love open source. I sometimes play basketball 🏀, and can never say no to a good read 📚

Overview

Newman is a command line Collection Runner for Postman. It allows you to run and test a Postman Collection directly from the command line. It is built with extensibility in mind so that you can easily integrate it with your continuous integration servers and build systems.

Newman Dashboard is a reporter for Newman and a real-time WebUI dashboard. It aims to enable users to control, view and debug Newman runs from a GUI.

This project aims to solve the following issues:

  1. There was no way to monitor simultaneously executing Newman runs except to view each and every terminal instance individually. The dashboard enables users to view all runs from a single endpoint and control them.
  2. There was no way to pause/resume/abort an executing Newman run. The dashboard now allows users to pause/abort a run and monitor it at different stages.
  3. There was no way to monitor the CPU and memory usage of a run. These stats are now available on the dashboard.

Work Done

Project Setup:

  1. Launch and daemonize broker on user command [ #1, #3 ]

    • Create project skeleton and structure
    • Setup linting and editor configuration
    • Setup Commander for argv parsing for the CLI
    • Setup a Express + Socket.io server
    • Launch the server as a daemon
  2. Setup NodeJS CI and CodeCov [ #2, #4 ]

    • Github Actions for CI
    • Test script runs both linting and the test suite
    • nyc and CodeCov for code coverage

Reporter

  1. Setup the reporter export [ #6 ]
    • Setup the listeners on Newman for run events
    • Establish socket.io-client to connect to the daemon from the run

Daemon

  1. Create a Pub/Sub architecture between the runs and the frontend [ #9, #12, #27 ]

    • Socket middleware to authenticate the frontend and runs connecting to the daemon
    • Wired the runs to emit events to the frontend and the frontend to emit control commands to the runs
    • Raw HTML based frontend
  2. Frontend for displaying run logs and control buttons [ #25, #37, #44]

    • Setting up NextJS and Mobx
    • Setting Tailwind and SCSS for styling
  3. In-memory store for capturing runs [ #45 ]

    • Setup classes and interface for maintaining an in-memory database.
    • Data fetching and hydrating MobX store upon start of frontend using services.

Documentation

  1. Architecture and repository structure [ #22 ]
  2. Readme.md for the project [ #8 ]

Future Scope

  1. Setup a persistent data store: To store the run data being transmitted to the dashboard we can setup a persistent data store which can be maintained locally using a NoSQL database file engine like LokiJS. Partial progress #28
  2. Modify the frontend: The frontend has huge scope in this project. We can draft specific components for handling every individual Newman event and to display the details specific to it. We can use graphs and charts to indicate any spikes in the executing run and so much more!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment