{"_id":"@alphabin/trx","_rev":"5-7fa40a0c0b1d83a0b82c428e055e8d19","name":"@alphabin/trx","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@alphabin/trx","version":"1.0.0","keywords":["playwright","testing","reporter","testreportx","azure","blob-storage","html-reports","test-reports"],"author":{"name":"Ayush Mania"},"license":"MIT","_id":"@alphabin/trx@1.0.0","maintainers":[{"name":"alphabin","email":"prat3ik@gmail.com"}],"homepage":"https://github.com/alphabin-01/testreportx-npm#readme","bugs":{"url":"https://github.com/alphabin-01/testreportx-npm/issues"},"dist":{"shasum":"f8ae8e166798ea0fb44ce54124d9cd59f159ff61","tarball":"https://registry.npmjs.org/@alphabin/trx/-/trx-1.0.0.tgz","fileCount":50,"integrity":"sha512-NPu1OBpUqHlFKHxoodGSngLxwRz76lO8Bi7Qhd6aSxW/hX3CLGDR3LapPW1ZCSU3DPwx5k6PQFU3mtlqQSMfkA==","signatures":[{"sig":"MEYCIQDvOaMhp+4TZO4zdRTXQmid5H+HEaaqjhBt/opVhn+a5QIhAKfbXudsKlHrIWCH97ti0eijYbFU9q55L/JDZbEPaVy6","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2000042},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"0b5d9a015a89e3008bd409a25573d306bff0ea8f","scripts":{"lint":"eslint \"src/**/*.ts\"","test":"echo \"Tests will be added\" && exit 0","build":"tsc","format":"prettier --write \"src/**/*.ts\"","typecheck":"tsc --noEmit","build:clean":"rm -rf dist && npm run build","format:check":"prettier --check \"src/**/*.ts\"","prepublishOnly":"npm run build:clean && npm run lint && npm run typecheck"},"_npmUser":{"name":"alphabin","email":"prat3ik@gmail.com"},"repository":{"url":"git+https://github.com/alphabin-01/testreportx-npm.git","type":"git"},"_npmVersion":"10.8.2","description":"TestReportX reporter for Playwright tests with Azure Blob Storage upload support","directories":{},"_nodeVersion":"20.19.1","dependencies":{"axios":"^1.9.0","debug":"^4.4.0","simple-git":"^3.27.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.57.1","prettier":"^3.5.3","typescript":"^5.8.3","@types/node":"^20.17.41","@types/debug":"^4.1.12","@playwright/test":"^1.52.0","@typescript-eslint/parser":"^8.15.0","@typescript-eslint/eslint-plugin":"^8.15.0"},"peerDependencies":{"@playwright/test":">=1.35.0"},"_npmOperationalInternal":{"tmp":"tmp/trx_1.0.0_1748932163399_0.8628619143331278","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@alphabin/trx","version":"1.0.1","keywords":["playwright","testing","reporter","trx","azure","blob-storage","html-reports","test-reports"],"author":{"name":"Ayush Mania"},"license":"MIT","_id":"@alphabin/trx@1.0.1","maintainers":[{"name":"alphabin","email":"prat3ik@gmail.com"}],"homepage":"https://github.com/alphabin-01/testreportx-npm#readme","bugs":{"url":"https://github.com/alphabin-01/testreportx-npm/issues"},"dist":{"shasum":"da6affcdf5c384cd275a8a66b61d55ca2e5b4b77","tarball":"https://registry.npmjs.org/@alphabin/trx/-/trx-1.0.1.tgz","fileCount":50,"integrity":"sha512-TXDuRa5iLdeTU35vBW7ICm6DYbGPqHkfQ5SDPeI7ll9TJE8Aw5vq3gTVO8+AJyuNZ2vlygF2jqaz544qeNaF4w==","signatures":[{"sig":"MEUCIQD9xAjmcyCiPw78os2xIRMQ3347aOVn5H7/CGg3RkkmVQIgJZblyBaotRN4HangST9BzLzegtcpuE5BhFLzwHhO3AQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1999468},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"64535341af3202bb19f4e38af7a2f6b325ded4bd","scripts":{"lint":"eslint \"src/**/*.ts\"","test":"echo \"Tests will be added\" && exit 0","build":"tsc","format":"prettier --write \"src/**/*.ts\"","typecheck":"tsc --noEmit","build:clean":"rm -rf dist && npm run build","format:check":"prettier --check \"src/**/*.ts\"","prepublishOnly":"npm run build:clean && npm run lint && npm run typecheck"},"_npmUser":{"name":"alphabin","email":"prat3ik@gmail.com"},"repository":{"url":"git+https://github.com/alphabin-01/testreportx-npm.git","type":"git"},"_npmVersion":"10.8.2","description":"TRX reporter for Playwright tests with Azure Blob Storage upload support","directories":{},"_nodeVersion":"20.19.1","dependencies":{"axios":"^1.9.0","debug":"^4.4.0","simple-git":"^3.27.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.57.1","prettier":"^3.5.3","typescript":"^5.8.3","@types/node":"^20.17.41","@types/debug":"^4.1.12","@playwright/test":"^1.52.0","@typescript-eslint/parser":"^8.15.0","@typescript-eslint/eslint-plugin":"^8.15.0"},"peerDependencies":{"@playwright/test":">=1.35.0"},"_npmOperationalInternal":{"tmp":"tmp/trx_1.0.1_1749035661600_0.44181987031603676","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@alphabin/trx","version":"1.0.2","keywords":["playwright","testing","reporter","trx","azure","blob-storage","html-reports","test-reports"],"author":{"name":"Ayush Mania"},"license":"MIT","_id":"@alphabin/trx@1.0.2","maintainers":[{"name":"alphabin","email":"prat3ik@gmail.com"}],"homepage":"https://github.com/alphabin-01/testreportx-npm#readme","bugs":{"url":"https://github.com/alphabin-01/testreportx-npm/issues"},"dist":{"shasum":"e4091d4315c1405579997c73f7d0e6632540224b","tarball":"https://registry.npmjs.org/@alphabin/trx/-/trx-1.0.2.tgz","fileCount":50,"integrity":"sha512-0RbcxSbM/10da9PVbFHE70njK6Z7WWuMuCwnUKlO1xFV2xjHAmJCiugUb2NBIHFiKaLAiNitj9mzWL9nHHEUuQ==","signatures":[{"sig":"MEUCIQDbd2MaKwPLVziDb54TPpayVkD52XUjTdj/gkCgEJz5QAIgX6BjnemFYaN4l5Bkmbh+ErGpCLh/TKX1xxPHEZqc4as=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2048460},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"c20540aa07fb9891af8f3bbfcc3f8d0f514e3e48","scripts":{"lint":"eslint \"src/**/*.ts\"","test":"echo \"Tests will be added\" && exit 0","build":"tsc","format":"prettier --write \"src/**/*.ts\"","typecheck":"tsc --noEmit","build:clean":"rm -rf dist && npm run build","format:check":"prettier --check \"src/**/*.ts\"","prepublishOnly":"npm run build:clean && npm run lint && npm run typecheck"},"_npmUser":{"name":"alphabin","email":"prat3ik@gmail.com"},"repository":{"url":"git+https://github.com/alphabin-01/testreportx-npm.git","type":"git"},"_npmVersion":"10.8.2","description":"TRX reporter for Playwright tests with Azure Blob Storage upload support","directories":{},"_nodeVersion":"20.19.1","dependencies":{"axios":"^1.9.0","debug":"^4.4.0","simple-git":"^3.27.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.57.1","prettier":"^3.5.3","typescript":"^5.8.3","@types/node":"^20.17.41","@types/debug":"^4.1.12","@playwright/test":"^1.52.0","@typescript-eslint/parser":"^8.15.0","@typescript-eslint/eslint-plugin":"^8.15.0"},"peerDependencies":{"@playwright/test":">=1.35.0"},"_npmOperationalInternal":{"tmp":"tmp/trx_1.0.2_1749457754421_0.39317169030658095","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@alphabin/trx","version":"1.0.3","keywords":["playwright","testing","reporter","trx","azure","blob-storage","html-reports","test-reports"],"author":{"name":"Ayush Mania"},"license":"MIT","_id":"@alphabin/trx@1.0.3","maintainers":[{"name":"alphabin","email":"prat3ik@gmail.com"}],"homepage":"https://github.com/alphabin-01/testreportx-npm#readme","bugs":{"url":"https://github.com/alphabin-01/testreportx-npm/issues"},"dist":{"shasum":"e8eb8b34d625773dd662da6433d1f3b2a2440630","tarball":"https://registry.npmjs.org/@alphabin/trx/-/trx-1.0.3.tgz","fileCount":50,"integrity":"sha512-jrnXzV/f2+Mc3BDp1QEUjSdJZjFAgRJWm/9oPsgErCSuI0utzbz0QTyj2p+fOTNYJGACwXVW3xrZsZw4cxj9Wg==","signatures":[{"sig":"MEYCIQCAvxCib7zPBv5IuofO9k6pt9gYelvWFe3VVk4ItaLctAIhAIKUVdEiuvC2C6S7fr6DEPfvF1DLLVEbYKKNygkYB5xV","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2063468},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"7ce451e8a2f68e7d27ac5c57bfa8ee854f2b48ab","scripts":{"lint":"eslint \"src/**/*.ts\"","test":"echo \"Tests will be added\" && exit 0","build":"tsc","format":"prettier --write \"src/**/*.ts\"","typecheck":"tsc --noEmit","build:clean":"rm -rf dist && npm run build","format:check":"prettier --check \"src/**/*.ts\"","prepublishOnly":"npm run build:clean && npm run lint && npm run typecheck"},"_npmUser":{"name":"alphabin","email":"prat3ik@gmail.com"},"repository":{"url":"git+https://github.com/alphabin-01/testreportx-npm.git","type":"git"},"_npmVersion":"10.8.2","description":"TRX reporter for Playwright tests with Azure Blob Storage upload support","directories":{},"_nodeVersion":"20.19.1","dependencies":{"axios":"^1.9.0","debug":"^4.4.0","simple-git":"^3.27.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.57.1","prettier":"^3.5.3","typescript":"^5.8.3","@types/node":"^20.17.41","@types/debug":"^4.1.12","@playwright/test":"^1.52.0","@typescript-eslint/parser":"^8.15.0","@typescript-eslint/eslint-plugin":"^8.15.0"},"peerDependencies":{"@playwright/test":">=1.35.0"},"_npmOperationalInternal":{"tmp":"tmp/trx_1.0.3_1749463846034_0.975387585965396","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@alphabin/trx","version":"1.0.4","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"description":"TRX reporter for Playwright tests with Azure Blob Storage upload support","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","build:clean":"rm -rf dist && npm run build","test":"echo \"Tests will be added\" && exit 0","lint":"eslint \"src/**/*.ts\"","format":"prettier --write \"src/**/*.ts\"","format:check":"prettier --check \"src/**/*.ts\"","typecheck":"tsc --noEmit","prepublishOnly":"npm run build:clean && npm run lint && npm run typecheck"},"keywords":["playwright","testing","reporter","trx","azure","blob-storage","html-reports","test-reports"],"author":{"name":"Ayush Mania"},"license":"MIT","dependencies":{"axios":"^1.9.0","debug":"^4.4.0","simple-git":"^3.27.0"},"peerDependencies":{"@playwright/test":">=1.35.0"},"devDependencies":{"@playwright/test":"^1.52.0","@types/debug":"^4.1.12","@types/node":"^20.17.41","@typescript-eslint/eslint-plugin":"^8.15.0","@typescript-eslint/parser":"^8.15.0","eslint":"^8.57.1","prettier":"^3.5.3","typescript":"^5.8.3"},"engines":{"node":">=16.0.0"},"repository":{"type":"git","url":"git+https://github.com/alphabin-01/testreportx-npm.git"},"bugs":{"url":"https://github.com/alphabin-01/testreportx-npm/issues"},"homepage":"https://github.com/alphabin-01/testreportx-npm#readme","_id":"@alphabin/trx@1.0.4","gitHead":"633a3e6801f507352ae57a627053d07fbda16308","_nodeVersion":"20.19.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-JxWp0gGSayojlJvDkpTHHrPdpXQjY3SKbzm5gGmMb53rd0mvYRNZhG8gJbbXUacsGr97GczbhK732f30CjcSoA==","shasum":"2149478c0e28e77d507b6aa43a4e871b816fbcea","tarball":"https://registry.npmjs.org/@alphabin/trx/-/trx-1.0.4.tgz","fileCount":50,"unpackedSize":2063838,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIErsMPMH8akaZE/yGxecP9EEHM2PVy3WSlJZQuWWXXvVAiEAqqRDhWBs/zFDZevOT2ARaByNWSQW28kNDv7MnAkQ1lY="}]},"_npmUser":{"name":"alphabin","email":"prat3ik@gmail.com"},"directories":{},"maintainers":[{"name":"alphabin","email":"prat3ik@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/trx_1.0.4_1749470195134_0.771039491058273"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-03T06:29:23.306Z","modified":"2025-06-09T11:56:35.462Z","1.0.0":"2025-06-03T06:29:23.592Z","1.0.1":"2025-06-04T11:14:21.792Z","1.0.2":"2025-06-09T08:29:14.618Z","1.0.3":"2025-06-09T10:10:46.216Z","1.0.4":"2025-06-09T11:56:35.308Z"},"bugs":{"url":"https://github.com/alphabin-01/testreportx-npm/issues"},"author":{"name":"Ayush Mania"},"license":"MIT","homepage":"https://github.com/alphabin-01/testreportx-npm#readme","keywords":["playwright","testing","reporter","trx","azure","blob-storage","html-reports","test-reports"],"repository":{"type":"git","url":"git+https://github.com/alphabin-01/testreportx-npm.git"},"description":"TRX reporter for Playwright tests with Azure Blob Storage upload support","maintainers":[{"name":"alphabin","email":"prat3ik@gmail.com"}],"readme":"# TRX Playwright Reporter\n\n*Maintained by Ayush Mania (GitHub: [@alphabin-01](https://github.com/alphabin-01))*\n\n[![npm version](https://badge.fury.io/js/%40alphabin%2Ftrx.svg)](https://badge.fury.io/js/%40alphabin%2Ftrx)\n\nA Playwright reporter that sends detailed test results and environment metadata to the TRX server for advanced test analytics and reporting.\n\n## Features\n\n- 📊 Automatically sends Playwright test results to the TRX server.\n- 🔍 Collects comprehensive metadata about your test runs:\n  - **Git:** Branch, commit (hash, message, author, email, timestamp), repository (name, URL), PR details (if available).\n  - **CI/CD:** Provider detection (GitHub Actions, GitLab CI, Jenkins, etc.), pipeline (ID, name, URL), build (number, trigger), environment details.\n  - **System:** Hostname, CPU (count, model), memory, OS, Node.js version, Playwright version.\n  - **Test Configuration:** Detailed info including browsers used (ID, name, version, viewport, headless, retries), workers, timeouts, reporters configured, grep filters, and more.\n- 🏷️ Support for associating custom tags with test runs via reporter options.\n- 🔁 Built-in retry mechanism for API requests to the TRX server.\n- 🔒 Secure API key authentication.\n- 📝 Optional verbose debug logging via the `debug` option or by setting `DEBUG=alphabin:trx`.\n\n## Installation\n\n```bash\nnpm install --save-dev @alphabin/trx\n# or\nyarn add --dev @alphabin/trx\n# or\npnpm add --save-dev @alphabin/trx\n```\n\n## Configuration\n\nAdd the reporter to your `playwright.config.js` or `playwright.config.ts`. You **must** also include Playwright's built-in `json` reporter, as `@alphabin/trx` reads its output.\n\n```javascript\n// playwright.config.js\nconst { defineConfig } = require('@playwright/test');\n\nmodule.exports = defineConfig({\n  // ... other config settings\n  reporter: [\n    // Required reporters\n    ['json', { outputFile: 'test-results/report.json' }],\n    ['@alphabin/trx', {\n      serverUrl: process.env.TRX_SERVER_URL || 'YOUR_TRX_SERVER_URL',\n      apiKey: process.env.TRX_API_KEY,\n\n      // Optional: Add custom tags to the run\n      tags: ['smoke-test', process.env.CI_COMMIT_REF_SLUG]\n      \n      // ... see options below\n    }],\n    // If you want to upload media to cloud, enable HTML reporter like given below\n    ['html', {\n      outputDir: 'playwright-report',\n      open: 'never'\n    }],\n  ],\n  // ... rest of your config\n});\n```\n\n> **Important**: Ensure the `json` reporter is configured to output a file (e.g., `test-results/report.json`). The `@alphabin/trx` reporter will read this file after the test run finishes.\n\n## Reporter Options\n\nThe `@alphabin/trx` reporter accepts the following options:\n\n| Option                 | Type    | Required | Default        | Description                                            |\n| :--------------------- | :------ | :------- | :------------- | :----------------------------------------------------- |\n| `serverUrl`            | string  | Yes      | -              | URL of the TRX server instance.               |\n| `apiKey`               | string  | Yes      | -              | API key for authenticating with the server.            |\n| `tags`                 | string[]| No       | `[]`           | Array of custom string tags to associate with the run. |\n| `reportDir`            | string  | No       | `./test-results`| Directory where the `report.json` file is expected.    |\n| `debug`                | boolean | No       | `false`        | Enable verbose debug logging for the reporter.         |\n| `timeout`              | number  | No       | `30000`        | Timeout for API requests to the server (in ms).        |\n| `retries`              | number  | No       | `3`            | Number of retry attempts for failed API requests.      |\n\n## Environment Variables\n\nYou can configure required options via environment variables:\n\n- `TRX_SERVER_URL` – Sets the `serverUrl`.\n- `TRX_API_KEY` – Sets the `apiKey`.\n\nFor debugging, set the `DEBUG` environment variable:\n\n```bash\nDEBUG=alphabin:trx npx playwright test\n```\n\n## Metadata Structure\n\nThe reporter collects and sends following metadata to the TRX server:\n\n```json\n{\n  \"git\": {\n    \"branch\": \"string\",\n    \"commit\": {\n      \"hash\": \"string\",\n      \"message\": \"string\"\n    },\n    \"repository\": {\n      \"name\": \"string\",\n      \"url\": \"string\"\n    },\n    \"pr\": {\n      \"id\": \"string\",\n      \"title\": \"string\",\n      \"url\": \"string\"\n    }\n  },\n  \"ci\": {\n    \"provider\": \"string\",\n    \"pipeline\": {\n      \"id\": \"string\",\n      \"name\": \"string\",\n      \"url\": \"string\"\n    },\n    \"build\": {\n      \"number\": \"string\",\n      \"trigger\": \"string\"\n    },\n    \"environment\": {\n      \"name\": \"string\",\n      \"type\": \"string\",\n      \"os\": \"string\",\n      \"node\": \"string\"\n    }\n  },\n  \"system\": {\n    \"hostname\": \"string\",\n    \"cpu\": {\n      \"count\": \"number\",\n      \"model\": \"string\"\n    },\n    \"memory\": {\n      \"total\": \"string\"\n    },\n    \"os\": \"string\",\n    \"nodejs\": \"string\",\n    \"playwright\": \"string\"\n  },\n  \"test\": {\n    \"config\": {\n      \"browsers\": [\n        {\n          \"browserId\": \"string\",\n          \"name\": \"string\",\n          \"version\": \"string\",\n          \"viewport\": \"string\",\n          \"headless\": \"boolean\",\n          \"repeatEach\": \"number\",\n          \"retries\": \"number\",\n          \"testDir\": \"string\",\n          \"outputDir\": \"string\"\n        }\n      ],\n      \"actualWorkers\": \"number\",\n      \"timeout\": \"number\",\n      \"preserveOutput\": \"string\",\n      \"fullyParallel\": \"boolean\",\n      \"forbidOnly\": \"boolean\",\n      \"projects\": \"number\",\n      \"shard\": \"string | null\",\n      \"reporters\": [\n        {\n          \"name\": \"string\",\n          \"options\": \"any\"\n        }\n      ],\n      \"grep\": \"any\",\n      \"grepInvert\": \"any\"\n    },\n    \"customTags\": [\"string\"]\n  }\n}\n```\n\n## Supported CI/CD Providers\n\nThe reporter automatically detects and collects information from the following CI/CD providers by checking standard environment variables:\n\n- GitHub Actions\n- GitLab CI\n- CircleCI\n- Jenkins\n- Azure DevOps\n- (Generic `CI=true` detection)\n\n## Examples\n\nSee the [examples](./examples) directory for sample `playwright.config.js` files.\n\n## License\n\nMIT","readmeFilename":"README.md"}