Giter Site home page Giter Site logo

happysahota / newman-reporter-json-extralight Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 5 KB

Reporter which provide a concise JSON summary of essential run data, omitting stream-related and assertion script details. It significantly reduces JSON size from 450MB to 6MB, enhancing performance and readability.

License: MIT License

JavaScript 100.00%

newman-reporter-json-extralight's Introduction

Newman Reporter JSON Extra Light

The "newman-reporter-json-extralight" customizes Newman's reporting, providing a concise JSON summary of essential run data, omitting unnecessary details like stream-related information and test assertion scripts. It significantly reduces JSON size from 450MB to 6MB, enhancing performance and readability.

Features:

  • Concise Reporting: Focuses on key run data, improving readability.
  • Reduced JSON Size: Significantly reduces JSON file size for improved efficiency.
  • Performance Enhancement: Streamlined reporting enhances performance during data processing.
  • Easy Integration: Easily installable via npm, seamlessly integrates into Newman workflows.

How to Use:

  1. Install the custom reporter via npm:
    npm install -g newman-reporter-json-extralight
  2. Specify the reporter when running Newman:
    newman run <collection-file> --reporters json-extralight

Schema followed by the reporter:

{
  "type": "object",
  "properties": {
    "stats": {
      "type": "object",
      "properties": {
        "iterations": {
          "type": "object",
          "properties": {
            "total": { "type": "integer" },
            "pending": { "type": "integer" },
            "failed": { "type": "integer" }
          }
        },
        "items": {
          "type": "object",
          "properties": {
            "total": { "type": "integer" },
            "pending": { "type": "integer" },
            "failed": { "type": "integer" }
          }
        },
        "scripts": {
          "type": "object",
          "properties": {
            "total": { "type": "integer" },
            "pending": { "type": "integer" },
            "failed": { "type": "integer" }
          }
        },
        "prerequests": {
          "type": "object",
          "properties": {
            "total": { "type": "integer" },
            "pending": { "type": "integer" },
            "failed": { "type": "integer" }
          }
        },
        "requests": {
          "type": "object",
          "properties": {
            "total": { "type": "integer" },
            "pending": { "type": "integer" },
            "failed": { "type": "integer" }
          }
        },
        "tests": {
          "type": "object",
          "properties": {
            "total": { "type": "integer" },
            "pending": { "type": "integer" },
            "failed": { "type": "integer" }
          }
        },
        "assertions": {
          "type": "object",
          "properties": {
            "total": { "type": "integer" },
            "pending": { "type": "integer" },
            "failed": { "type": "integer" }
          }
        },
        "testScripts": {
          "type": "object",
          "properties": {
            "total": { "type": "integer" },
            "pending": { "type": "integer" },
            "failed": { "type": "integer" }
          }
        },
        "prerequestScripts": {
          "type": "object",
          "properties": {
            "total": { "type": "integer" },
            "pending": { "type": "integer" },
            "failed": { "type": "integer" }
          }
        }
      }
    },
    "timings": {
      "type": "object",
      "properties": {
        "responseAverage": { "type": "number" },
        "responseMin": { "type": "number" },
        "responseMax": { "type": "number" },
        "responseSd": { "type": "number" },
        "dnsAverage": { "type": "number" },
        "dnsMin": { "type": "number" },
        "dnsMax": { "type": "number" },
        "dnsSd": { "type": "number" },
        "firstByteAverage": { "type": "number" },
        "firstByteMin": { "type": "number" },
        "firstByteMax": { "type": "number" },
        "firstByteSd": { "type": "number" },
        "started": { "type": "number" },
        "completed": { "type": "number" }
      }
    },
    "executions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "cursor": {
            "type": "object",
            "properties": {
              "position": { "type": "integer" },
              "iteration": { "type": "integer" },
              "length": { "type": "integer" },
              "cycles": { "type": "integer" },
              "empty": { "type": "boolean" },
              "eof": { "type": "boolean" },
              "bof": { "type": "boolean" },
              "cr": { "type": "boolean" },
              "ref": { "type": "string" },
              "httpRequestId": { "type": "string" }
            }
          },
          "item": {
            "type": "object",
            "properties": {
              "id": { "type": "string" },
              "name": { "type": "string" },
              "request": { "type": "object" },
              "response": { "type": "array" },
              "event": { "type": "array" },
              "protocolProfileBehavior": { "type": "object" }
            }
          },
          "request": { "type": "object" },
          "response": { "type": "object" },
          "id": { "type": "string" },
          "assertions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "assertion": { "type": "string" },
                "skipped": { "type": "boolean" },
                "error": {
                  "type": "object",
                  "properties": {
                    "name": { "type": "string" },
                    "index": { "type": "integer" },
                    "test": { "type": "string" },
                    "message": { "type": "string" },
                    "stack": { "type": "string" }
                  }
                }
              }
            }
          }
        }
      }
    },
    "transfers": {
      "type": "object",
      "properties": {
        "responseTotal": { "type": "integer" }
      }
    },
    "failures": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "name": { "type": "string" },
              "index": { "type": "integer" },
              "test": { "type": "string" },
              "message": { "type": "string" },
              "stack": { "type": "string" },
              "checksum": { "type": "string" },
              "id": { "type": "string" },
              "timestamp": { "type": "integer" },
              "stacktrace": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "fileName": { "type": "string" },
                    "lineNumber": { "type": "integer" },
                    "functionName": { "type": "string" },
                    "typeName": { "type": "string" },
                    "methodName": { "type": "string" },
                    "columnNumber": { "type": "integer" },
                    "native": { "type": "boolean" }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

License:

This project is licensed under the MIT License

newman-reporter-json-extralight's People

Contributors

happysahota avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.