{"id":20137072,"url":"https://github.com/ctrf-io/newman-reporter-ctrf-json","last_synced_at":"2026-03-15T20:14:42.203Z","repository":{"id":226953493,"uuid":"750493997","full_name":"ctrf-io/newman-reporter-ctrf-json","owner":"ctrf-io","description":"A Newman JSON test results reporter that follows the CTRF schema","archived":false,"fork":false,"pushed_at":"2025-04-06T18:15:58.000Z","size":401,"stargazers_count":8,"open_issues_count":6,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T18:22:09.723Z","etag":null,"topics":["newman","newman-reporter","postman","test-automation","test-reporting"],"latest_commit_sha":null,"homepage":"https://ctrf.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ctrf-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-30T18:46:33.000Z","updated_at":"2025-04-06T18:16:01.000Z","dependencies_parsed_at":"2024-03-10T19:47:49.805Z","dependency_job_id":"07f9dbf0-3dee-4379-8b98-aacb429a22f0","html_url":"https://github.com/ctrf-io/newman-reporter-ctrf-json","commit_stats":null,"previous_names":["ctrf-io/newman-reporter-ctrf-json"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrf-io%2Fnewman-reporter-ctrf-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrf-io%2Fnewman-reporter-ctrf-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrf-io%2Fnewman-reporter-ctrf-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrf-io%2Fnewman-reporter-ctrf-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctrf-io","download_url":"https://codeload.github.com/ctrf-io/newman-reporter-ctrf-json/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248082886,"owners_count":21044987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["newman","newman-reporter","postman","test-automation","test-reporting"],"created_at":"2024-11-13T21:25:03.597Z","updated_at":"2026-03-15T20:14:42.147Z","avatar_url":"https://github.com/ctrf-io.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Newman Postman JSON test results report\n\n\u003e Save Newman Postman test results as a JSON file\n\nA Postman newman JSON test reporter to create test reports that follow the CTRF standard.\n\n[Common Test Report Format](https://ctrf.io) ensures the generation of uniform JSON test reports, independent of programming languages or test framework in use.\n\n\u003cdiv align=\"center\"\u003e\n\u003cdiv style=\"padding: 1.5rem; border-radius: 8px; margin: 1rem 0; border: 1px solid #30363d;\"\u003e\n\u003cspan style=\"font-size: 23px;\"\u003e💚\u003c/span\u003e\n\u003ch3 style=\"margin: 1rem 0;\"\u003eCTRF tooling is open source and free to use\u003c/h3\u003e\n\u003cp style=\"font-size: 16px;\"\u003eYou can support the project with a follow and a star\u003c/p\u003e\n\n\u003cdiv style=\"margin-top: 1.5rem;\"\u003e\n\u003ca href=\"https://github.com/ctrf-io/newman-reporter-ctrf-json\"\u003e\n\u003cimg src=\"https://img.shields.io/github/stars/ctrf-io/newman-reporter-ctrf-json?style=for-the-badge\u0026color=2ea043\" alt=\"GitHub stars\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/ctrf-io\"\u003e\n\u003cimg src=\"https://img.shields.io/github/followers/ctrf-io?style=for-the-badge\u0026color=2ea043\" alt=\"GitHub followers\"\u003e\n\u003c/a\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\n\u003cp style=\"font-size: 14px; margin: 1rem 0;\"\u003e\nMaintained by \u003ca href=\"https://github.com/ma11hewthomas\"\u003eMatthew Thomas\u003c/a\u003e\u003cbr/\u003e\nContributions are very welcome! \u003cbr/\u003e\nExplore more \u003ca href=\"https://www.ctrf.io/integrations\"\u003eintegrations\u003c/a\u003e\n\u003c/p\u003e\n\u003c/div\u003e\n\n## Features\n\n- Generate JSON test reports that are [CTRF](https://ctrf.io) compliant\n- Straightforward integration with newman\n\n```json\n{\n  \"results\": {\n    \"tool\": {\n      \"name\": \"newman\"\n    },\n    \"summary\": {\n      \"tests\": 1,\n      \"passed\": 1,\n      \"failed\": 0,\n      \"pending\": 0,\n      \"skipped\": 0,\n      \"other\": 0,\n      \"start\": 1706828654274,\n      \"stop\": 1706828655782\n    },\n    \"tests\": [\n      {\n        \"name\": \"ctrf should generate the same report with any tool\",\n        \"status\": \"passed\",\n        \"duration\": 100\n      }\n    ],\n    \"environment\": {\n      \"appName\": \"MyApp\",\n      \"buildName\": \"MyBuild\",\n      \"buildNumber\": \"1\"\n    }\n  }\n}\n```\n\n## What is CTRF?\n\nCTRF is a universal JSON test report schema that addresses the lack of a standardized format for JSON test reports.\n\n**Consistency Across Tools:** Different testing tools and frameworks often produce reports in varied formats. CTRF ensures a uniform structure, making it easier to understand and compare reports, regardless of the testing tool used.\n\n**Language and Framework Agnostic:** It provides a universal reporting schema that works seamlessly with any programming language and testing framework.\n\n**Facilitates Better Analysis:** With a standardized format, programatically analyzing test outcomes across multiple platforms becomes more straightforward.\n\n## Installation\n\n```bash\nnpm install newman-reporter-ctrf-json\n```\n\nRun your tests with the reporter argument via the cli:\n\n```bash\nnewman run ./postman_collection.json -r cli,ctrf-json\n```\n\nor programmatically:\n\n```js\nconst newman = require('newman') // require newman in your project\n\n// call newman.run to pass `options` object and wait for callback\nnewman.run(\n  {\n    collection: require('./sample-collection.json'),\n    reporters: ['cli', 'ctrf-json'],\n  },\n  function (err) {\n    if (err) {\n      throw err\n    }\n    console.log('collection run complete!')\n  }\n)\n```\n\nYou'll find a JSON file named `ctrf-report.json` in the `ctrf` directory.\n\n## Reporter Options\n\nThe reporter supports several configuration options, you can pass these via the command line:\n\n```bash\nnewman run ./postman_collection.json -r cli,ctrf-json \\\n--reporter-ctrf-json-output-file custom-name.json \\\n--reporter-ctrf-json-output-dir custom-directory \\\n--reporter-ctrf-json-test-type api \\\n--reporter-ctrf-json-minimal false \\\n--reporter-ctrf-json-app-name MyApp \\\n--reporter-ctrf-json-app-version 1.0.0 \\\n--reporter-ctrf-json-os-platform linux \\\n--reporter-ctrf-json-os-release 18.04 \\\n--reporter-ctrf-json-os-version 5.4.0 \\\n--reporter-ctrf-json-build-name MyApp \\\n--reporter-ctrf-json-build-number 100 \\\n--reporter-ctrf-json-build-url https://ctrf.io \\\n--reporter-ctrf-json-repository-name ctrf \\\n--reporter-ctrf-json-repository-url https://github.com/ctrf-io/newman-reporter-ctrf-json \\\n--reporter-ctrf-json-branch-name main \\\n--reporter-ctrf-json-test-environment staging\n```\n\nor programmatically:\n\n```js\nconst newman = require('newman') // require newman in your project\n\n// call newman.run to pass `options` object and wait for callback\nnewman.run(\n  {\n    collection: require('./sample-collection.json'),\n    reporters: ['cli', 'ctrf-json'],\n    reporter: {\n      'ctrf-json': {\n        outputFile: 'api_report_ctrf.json',\n        outputDir: 'api_reports',\n        minimal: true,\n        testType: 'api',\n        appName: 'MyApp',\n        appVersion: '1.0.0',\n        osPlatform: 'linux',\n        osRelease: '18.04',\n        osVersion: '5.4.0',\n        buildName: 'MyApp',\n        buildNumber: '100',\n        buildUrl: 'https://ctrf.io',\n        repositoryName: 'ctrf',\n        repositoryUrl: 'https://github.com/ctrf-io/newman-reporter-ctrf-json',\n        branchName: 'main',\n        testEnvironment: 'staging',\n      },\n    },\n  },\n  function (err) {\n    if (err) {\n      throw err\n    }\n    console.log('collection run complete!')\n  }\n)\n```\n\n## Test Object Properties\n\nThe test object in the report includes the following [CTRF properties](https://ctrf.io/docs/schema/test):\n\n| Name       | Type   | Required | Details                                                                             |\n| ---------- | ------ | -------- | ----------------------------------------------------------------------------------- |\n| `name`     | String | Required | The name of the test.                                                               |\n| `status`   | String | Required | The outcome of the test. One of: `passed`, `failed`, `skipped`, `pending`, `other`. |\n| `duration` | Number | Required | The time taken for the test execution, in milliseconds.                             |\n| `message`  | String | Optional | The failure message if the test failed.                                             |\n| `trace`    | String | Optional | The stack trace captured if the test failed.                                        |\n| `suite`    | String | Optional | The suite or group to which the test belongs.                                       |\n| `type`     | String | Optional | The type of test (e.g., `api`, `contract`).                                         |\n\n## Support Us\n\nIf you find this project useful, consider giving it a GitHub star ⭐ It means a lot to us.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctrf-io%2Fnewman-reporter-ctrf-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctrf-io%2Fnewman-reporter-ctrf-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctrf-io%2Fnewman-reporter-ctrf-json/lists"}