{"_id":"@arabyzy/cypress-testrail-reporter","_rev":"1-aa01970c05c7b92d09302e84964c2aea","name":"@arabyzy/cypress-testrail-reporter","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@arabyzy/cypress-testrail-reporter","description":"Parse and Post your cypress results to testrail","version":"1.0.0","bin":{"cypress-testrail-reporter":"dist/index.js"},"main":"./dist/index.js","types":"./dist/types.d.ts","scripts":{"eslint":"eslint --ext .ts,.js './src'","lint":"yarn eslint","test":"jest","build":"tsc -p .","release":"yarn build && npm publish --access public"},"dependencies":{"@sum.cumo/node-testrail":"2.3.0","yargs":"^17.0.1"},"keywords":["testrail","api","cypress","typescript","mochawesome"],"license":"Apache-2.0","devDependencies":{"@babel/core":"^7.14.6","@babel/plugin-proposal-object-rest-spread":"7.14.7","@babel/plugin-transform-runtime":"^7.14.5","@babel/preset-env":"7.14.7","@babel/preset-typescript":"7.14.5","@commitlint/cli":"^12.1.4","@commitlint/config-conventional":"^12.1.4","@types/jest":"^26.0.23","@typescript-eslint/eslint-plugin":"^4.28.1","@typescript-eslint/parser":"^4.28.1","eslint":"^7.29.0","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","jest":"^27.0.6","simple-git-hooks":"^2.5.1","ts-jest":"^27.0.3","typescript":"4.3.4"},"simple-git-hooks":{"pre-commit":"yarn lint","commit-msg":"npx commitlint -e"},"gitHead":"809854cb49a7fc7d27b61d50759c1a441d0a6268","_id":"@arabyzy/cypress-testrail-reporter@1.0.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-2LPeQwNu3NpQKvafTM5VOR1dNZYJeZJ655mYdjj4I1ZgsPNJJYZfFoz473rG4gFMZhWrmrskUpj6pwOIKlYWRg==","shasum":"e5bd209c437403de69fdf002ba4770ed80ff6ef5","tarball":"https://registry.npmjs.org/@arabyzy/cypress-testrail-reporter/-/cypress-testrail-reporter-1.0.0.tgz","fileCount":19,"unpackedSize":45611,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD10Cppvk4gsGNAKOgTNLYk+4kRo32BYTv4C8sTlO2phAIhAJQ8FKui+VYjwBLjb0iGzpzP6+g+Yhyza5CyCjaWGKNt"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1PYNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqMZw//TCzGOL6r69olFDONbvSa85JiNr7bBynDmT9EcBixX5dNwnGu\r\n+h8yAk3jDS4EkrwIdtQK23qP2R7VImpOAAX9uc91EgBKcObDvF5kFxSUxXxB\r\nk/QlThF0r+/yd2Km0xIBqV39itZjyhUOcNRAxOIkW2VJvZrk5i0KvGg+NgFS\r\nivwwyn81fLCeZemvZMf8gLw6o5XkXfEsPyCqz2IT6WBl0zzbKMDcfCRn9iZP\r\nFlyZxuQPQln9E0l4/FhXkCSvK78LOPZXR7stXl4SL0HYDzJWN3ugUsaeaqpY\r\nK3Bns25RHvrj9NG6gkcJAGTmFzXSSEOQXEAf1ZPmcD9p5VosjXcbHnP2zij9\r\nb+AgHpNFXRzo5W0g6Hzj6WhJOkqNvQtbm3zBJ8N4BZR0kkOqf4e8xF8LGJxu\r\nA7Ohq7Xn6XH8RJX/BEhS74Hv912M1H2jieCLCgSnuP1GFRe5hlLTi4KFgAPV\r\nSZsGmOkyMqKVsWGnxrgfN3FwTJwBgqI/YsjxwpOoXAotD+n6yyAYqJtMLvT1\r\nzGV0P7grm8UZqdR7gjOxSwFlElFior4MscvLaGsjFrgak7cdRMLX32S7k1xb\r\nQC+8/5w1Ped8CEDEyBAKLjk33nhEsTb0VoGB/TJt84mJ+mIQOkZc/Ngi65cF\r\ns7h++NyiLQ2TuIWBo82n6n5QJzkifXVvcmA=\r\n=sPY0\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"araby_zy","email":"yao.zhong@compass.com"},"directories":{},"maintainers":[{"name":"araby_zy","email":"yao.zhong@compass.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cypress-testrail-reporter_1.0.0_1658123789526_0.7373651778921753"},"_hasShrinkwrap":false},"1.0.1":{"name":"@arabyzy/cypress-testrail-reporter","description":"Parse and Post your cypress results to testrail","version":"1.0.1","bin":{"cypress-testrail-reporter":"dist/index.js"},"main":"./dist/index.js","types":"./dist/types.d.ts","scripts":{"eslint":"eslint --ext .ts,.js './src'","lint":"yarn eslint","test":"jest","build":"tsc -p .","release":"yarn build && npm publish --access public"},"dependencies":{"@sum.cumo/node-testrail":"^2.4.1","yargs":"^17.0.1"},"keywords":["testrail","api","cypress","typescript","mochawesome"],"license":"Apache-2.0","devDependencies":{"@babel/core":"^7.14.6","@babel/plugin-proposal-object-rest-spread":"7.14.7","@babel/plugin-transform-runtime":"^7.14.5","@babel/preset-env":"7.14.7","@babel/preset-typescript":"7.14.5","@commitlint/cli":"^12.1.4","@commitlint/config-conventional":"^12.1.4","@types/jest":"^26.0.23","@typescript-eslint/eslint-plugin":"^4.28.1","@typescript-eslint/parser":"^4.28.1","eslint":"^7.29.0","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","jest":"^27.0.6","simple-git-hooks":"^2.5.1","ts-jest":"^27.0.3","typescript":"4.3.4"},"simple-git-hooks":{"pre-commit":"yarn lint","commit-msg":"npx commitlint -e"},"gitHead":"40d5e240956367cb7e024d884ca7ae5c5f31fdb9","_id":"@arabyzy/cypress-testrail-reporter@1.0.1","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-RjShu4FjmP335qZ1aNUmXoWaRhxIGkm/LTUxjnlL+KEObarYFbYL2uraumC8bLynAt6E1pTY/WYI9ZJLxY848Q==","shasum":"fc8f91c13eed4199071202fc07b17a5e704f2407","tarball":"https://registry.npmjs.org/@arabyzy/cypress-testrail-reporter/-/cypress-testrail-reporter-1.0.1.tgz","fileCount":19,"unpackedSize":45876,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDB+xcNSnV/t7S1lOTSN7dohi6vEH3yoeCcE79XXqfF9wIhAIAG8ZLGCspC/XrJpTn68plUO4Q7MNVLFVn8MCMG9XlX"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/g43ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrAIA/+KRZQHNUD9+Lvf006oLVrSzmk93dbDs3ZlM+1cTdt+3McQ3/q\r\nrXPR0+xTa6X6haA/TyYkyP5g6htUpjl+t7abKOTgbwQvVGfvcqDq6OYjaEsH\r\nH30YW6zGVzR+26dVtsRHzgC5/SysN7SrbhX6+A9GuHoiE2m69VksEuntQJ3q\r\n2saIftJ7PVw3NZeljD2ZZEiOj4Mv9mV5JNB7bEol0XRqiD64vcmoGPUsx7sE\r\nLFe9+eJxMQubqiEkfcn75JmkijjYflJGqZ/+q3uBKwV1Qgo5KS+cLL8Cvg1a\r\nB0EWvDeBivTnQ8MICZlga1QyuYfZ0hljHVknNTvN8aOeLzsw9uzI4sYtmaL2\r\nnFv8+Ge9nP05fZIIUdrtnY2ZrispYwAWGlsUu+IxsMi4oeQ9D+J2k/MOQzmr\r\nG6D0yn4iF3XVwuiFxkY4Fq6doYB198myXtJmTRZQl/M9KKYCe6RZ7O0enPAQ\r\nkvM4gois8Uaz604gc9yzSXtawOQ3cM1ZSSTH2t3UT9oKeQAE5WzD2qcVlHjU\r\nLcHz3Yu5Un/4rGVXeJMutB47zgpxi8ZMA7Umb8iCAXWFh6mOdZt1EEb6uku6\r\nd34a+Y4CWhz7ysK7x4sFrXwd+ebpVZzop3k9xBJyYCkQPey1TSdsoZTk1gae\r\noQUQDideU8qg2kQQ10jXQ1XMDrpfjtIN2oo=\r\n=dS/f\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"araby_zy","email":"yao.zhong@compass.com"},"directories":{},"maintainers":[{"name":"araby_zy","email":"yao.zhong@compass.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cypress-testrail-reporter_1.0.1_1660816951091_0.20161486387954963"},"_hasShrinkwrap":false}},"time":{"created":"2022-07-18T05:56:29.469Z","1.0.0":"2022-07-18T05:56:29.675Z","modified":"2022-08-18T10:02:31.350Z","1.0.1":"2022-08-18T10:02:31.246Z"},"maintainers":[{"name":"araby_zy","email":"yao.zhong@compass.com"}],"description":"Parse and Post your cypress results to testrail","keywords":["testrail","api","cypress","typescript","mochawesome"],"license":"Apache-2.0","readme":"# cypress-testrail-reporter\nThis little tool will help you to parse and post cypress test results to testrail.\n\nThis repo is forked from [sumcumo/cypress-testrail-reporter\n](https://github.com/sumcumo/cypress-testrail-reporter) as a temp compatibility with cypress v10.\n\nUsage of this repo is exact the same as `sumcumo/cypress-testrail-reporter` except it read config from `testrailReporter.json` instead of `cypress.json` since cypress v10 use a js/ts config file.\n\n## Preconditions\nThis tools works with Mochawesome Json Reports. So please make sure you have the following packages installed: \n```\nyarn add --dev mocha mochawesome mochawesome-merge\n```\n\n\nExample Configuration of the Mochawesome Reporter (`cypress.json`): \n``` json\n    \"reporter\": \"mochawesome\",\n    \"reporterOptions\": {\n        \"reportDir\": \"test/cypress/results\",\n        \"reportFilename\": \"mochawesomeReport.json\",\n        \"overwrite\": false,\n        \"html\": false,\n        \"json\": true\n    },\n```\n\nThis tool internally uses `@sum.cumo/Node-TestRail` (https://github.com/sumcumo/Node-TestRail) as Testrail API Client.\n\n## Installation\n```\nyarn add --dev @arabyzy/cypress-testrail-reporter\n```\n\n## Testrail Case Ids\nIn order to link you cypress tests to testrail cases it's required to provide the actual Testrail CaseId(s) in your tests title.\nExample:\n```\nit('should do something [123]', () => {})\n```\nOr\n```\ndescribe('Feature Tests [123]', () => {\n\n  it('should do something', () => {})\n  \n})\n```\n\nThe above examples will link the results of the test to a case C123 (C is the testrail Case Prefix. Case IDs are numerical)\n\n\n## Config\nThe Testrail Reporter gets its config from your `testrailReporter.json` and / or provided cli arguments.\n\n### Configuration via `testrailReporter.json`\nAdd a `testrailReporter` section to your Cypress Config. You can provide the following:\n\nArgument                    | Description\n------                      | ------\n`projectId`                 | The ID of your Testrail Project\n`suiteId`                   | Testrails Suite Id\n`branchReferenceRegex`      | This Reporter will create JIRA References if this regex is matching your Branch name\n`host`                      | The Address of your running Testrail Application (API)\n`username`                  | A Username for Authentication against Testrail API\n`password`                  | The corresponding password or API token\n`reportFilename`            | The relative path to your mochawesome report, eg ./test/cypress/results/result.json\n`includeAll` .              | Whether include all test cases to current test run, Default: `false`\n\nExample:\n``` json\n{\n    ...\n    \"testrailReporter\": {\n        \"projectId\": \"1\",\n        \"suiteId\": \"2\",\n        \"branchReferenceRegex\": \"((feat|chore)-\\\\d*)\",\n        \"host\": \"https://example.testrail.io/\",\n        \"user\": \"some@one.com\",\n        \"password\": \"YOUR_PASSWORD\",\n        \"includeAll\": true\n    },\n```\n\n### Configuration via CLI Arguments\nYou can also provide the arguments `name` `password` and `host` within the cli like\n```\nyarn cypress-testrail-reporter --user some@one.com --password YOUR_PASSWORD --host https://example.testrail.io/\n``` \n\n## Usage\nAs soon as your Mochawesome Report was generated you can execute the following\n```\nyarn cypress-testrail-reporter --name NAME_OF_YOUR_TESTRUN\n```\nThis will create a new or update an existing Testrun with the given name and will report all results found in your Mochawesome Report.\n\n### Attachments\n```\nyarn cypress-testrail-reporter --name NAME_OF_YOUR_TESTRUN --attach test/cypress/results/report.html --assets test/cypress/videos test/cypress/screenshots --assetsArchiveName CUSTOM_NAME_FOR_YOUR_ARCHIVE\n```\nThis will create a new or update an existing Testrun with the given name and will report all results found in your Mochawesome Report.\nAfterwards it will attach a report.html to this run and create an archive containing all provided assets and attach it as well. \n\n\n\nArgument                    | Description\n------                      | ------\n`name`                      | The Name of your Testrail Run\n`suiteId`                   | Testrails suite Id\n`reportFilename`            | The relative path to your report (from `process.cwd`).Example: `result.json`  Default: `testrailReporter.reportFilename`\n`closeRun`                  | Whether to close the run automatically or not. Default: `false`\n`host`                      | The Address of your running Testrail Application (API)\n`username`                  | A Username for Authentication against Testrail API\n`password`                  | The corresponding password\n`assets`                    | Provide Assets Paths if you want to attach them to a run\n`assetsArchiveName`         | Provide a custom archive Name. Default: cypressAssets\n`attach`                    | Provide further attachments like reports\n\nFurther Details:\n```\nyarn cypress-testrail-reporter --help\n```\n\n## CI Integration\n\nThis Reporter is intended to be used in your CI / CD Pipeline. \n\n```yaml\nIntegration Test:\n  scripts:\n   - yarn cypress # Run your cypress tests\n   - yarn cypress-testrail-reporter --name $CI_COMMIT_REF_SLUG --user $TESTRAIL_USERNAME --password $TESTRAIL_PASSWORD\n```\n\nThe Example above will report result for the current branch and uses global variables for authentication. So you don't have to store credentials within your project and can use Gitlab CI Variables instead.\n","readmeFilename":"README.md"}