parameterizejson

1.1.0 • Public • Published

ParameterizeJson

parameterization of json for using it in test scripts

Install

npm install -g parameterizejson

Usage

parameterizeJson <folder_name>

Note that folder should contain similar type of requests in json format. This utility will then create a modified version of each file and also a input.csv file with replaced values

Prerequisites

Nodejs (4.4.3 +)

Description

This utility converts json into a parameterized json so that it can be used in test scripts for jmeter and postman. For eg given following json

{
  "glossary": {
    "title": "example glossary",
    "GlossDiv": {
      "title": "S",
      "GlossList": {
        "GlossEntry": {
          "ID": "SGML",
          "SortAs": "SGML",
          "GlossTerm": "Standard Generalized Markup Language",
          "Acronym": "SGML",
          "Abbrev": "ISO 8879:1986",
          "GlossDef": {
            "para": "A meta-markup language used to create markup languages such as DocBook.",
            "GlossSeeAlso": [
              "GML",
              "XML"
            ]
          },
          "GlossSee": "markup"
        }
      }
    }
  }
}

will be converted to

{
  "glossary": {
    "title": "${glossary_title}",
    "GlossDiv": {
      "title": "${glossdiv_title}",
      "GlossList": {
        "GlossEntry": {
          "ID": "${glossentry_id}",
          "SortAs": "${glossentry_sortas}",
          "GlossTerm": "${glossentry_glossterm}",
          "Acronym": "${glossentry_acronym}",
          "Abbrev": "${glossentry_abbrev}",
          "GlossDef": {
            "para": "${glossdef_para}",
            "GlossSeeAlso": [
              "${glossdef_glossseealso_0}",
              "${glossdef_glossseealso_1}"
            ]
          },
          "GlossSee": "${glossentry_glosssee}"
        }
      }
    }
  }
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.00latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.00
1.0.00

Package Sidebar

Install

npm i parameterizejson

Weekly Downloads

0

Version

1.1.0

License

MIT

Last publish

Collaborators

  • sikorski