Is there an effective way to review code written in Postman?

Viewed 508

As all Postman collections are basically .json files it's quite difficult to review code written in Postman via code review tools.

At the moment I continue to review such .json files on GitHub, however, it's not quite convenient.

For instance, here's some JS code sent for review in .json format

        "listen": "test",
        "script": {
            "id": "e8f64f04-8ca5-4b5a-8333-1f6bde73cf0c",
            "exec": [
                "var body = xml2Json(responseBody);",
                "// const resp = pm.response.json();",
                "let resp = body.projects;",
                "var b = \"New_Poject_e2e\"+pm.environment.get(\"random_number\");",
                " console.log(b);",
                "for (var i = 0; i < resp.project.length; i++)",
                "{",
                "    if (resp.project[i].name === b)",
                "    {",
                "    console.log(resp.project[i].id[\"_\"]);",
                "    pm.environment.set(\"projID\", resp.project[i].id[\"_\"]);",
                "    }",
                "}",
                ""
            ],
            "type": "text/javascript"
        }

Is there an effective way to carry out code review for Pre-request scripts, Requests, and Tests for Postman Collections?

1 Answers
Related