{"_id":"@dbouckaert/zephyr-scale-cloud-reporter","_rev":"2-3b54db7a288164ca11a8d004f9c72af9","name":"@dbouckaert/zephyr-scale-cloud-reporter","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.3":{"name":"@dbouckaert/zephyr-scale-cloud-reporter","version":"1.0.3","description":"ZH Cloud, or zephyr helpers is a Node JS framework that implements test suites with Zephyr scale for Jira. It uses a soft-assert function to absorb failing assertions and translate them to a true/false value.","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1","start:dev":"nodemon"},"repository":{"type":"git","url":"git+https://github.com/davidbouckaert/zephyr-scale-cloud-reporter.git"},"keywords":["ZEPHYR","zapi","test","reporter","zephyr scale","jira","cloud","jira-cloud","mocha"],"author":{"name":"David Bouckaert"},"license":"MIT","bugs":{"url":"https://github.com/davidbouckaert/zephyr-scale-cloud-reporter/issues"},"homepage":"https://github.com/davidbouckaert/zephyr-scale-cloud-reporter#readme","dependencies":{"@types/chai":"^4.3.3","awesome-typescript-loader":"^5.2.1","chai":"^4.3.6","source-map-loader":"^4.0.0","supertest":"^6.2.4"},"devDependencies":{"@types/node":"^18.11.9","@types/supertest":"^2.0.12","@typescript-eslint/eslint-plugin":"^5.36.1","@typescript-eslint/parser":"^5.36.1","eslint":"^8.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-airbnb-typescript":"^17.0.0","eslint-config-prettier":"^8.5.0","eslint-config-standard":"^17.0.0","eslint-plugin-import":"^2.26.0","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^4.2.1","eslint-plugin-promise":"^6.0.1","nodemon":"^2.0.19","ts-loader":"^9.3.1","ts-node":"^10.9.1","typescript":"^3.9.10"},"gitHead":"afa2ed115efdfc9500d163f8bc9c9efc56f837d1","_id":"@dbouckaert/zephyr-scale-cloud-reporter@1.0.3","_nodeVersion":"16.8.0","_npmVersion":"8.19.1","dist":{"integrity":"sha512-SEDzyEg4q6qrYU+jxyo7x5nQjgdC9iYFyZWLiW0Y4CuJr4154/7UEWxksZGfVU/t1dsXmQOvcEXltkdzTqWybw==","shasum":"a9efb40418918863693aab74eced53c447da6a10","tarball":"https://registry.npmjs.org/@dbouckaert/zephyr-scale-cloud-reporter/-/zephyr-scale-cloud-reporter-1.0.3.tgz","fileCount":42,"unpackedSize":28570,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLDLJT4L2iQOKIUG+GyMyyrylLyeswXVmqtMLV46ASTgIgcSLkDNIMFwHAnpmvCNB4xdaLMVsfV/aAYmhfBM9N4mI="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkEzRyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrz5RAApNsd19lVRwbTAWo5rxI5KiQ3iYcR5jtIW9wifdMTJdJSR7LU\r\nfvy2DUSDn5BGMm/6k12EmG9qPpep+G7Bedj1Zm9+O/oz2PyWNclGH4D8UoPt\r\n5x2TZi4qMzyb9AZOIsyk2m1kwmtf/dKYuMbpME7Zn8FwQzqjfBxDNqWXEX8z\r\nrHsAfD3ZcBomZOXGo3V6r5M+fV/J9YqWnyxPA0Md0EZ2lWGvT4arWxL+zKxm\r\nZHZWpPmeMHJPZ1QS7J8jF4VVlgg5xcOBdYOmUrnEBp9aLU0O6WdBjZLwspJz\r\nCP6pDlddEiGOlJhUrboJKRBJcCcz9zrRBgrdTMUcEUh3Sm2Nm3R2EJXRubPp\r\nckXPdrXADjqutnx44EJxEAI99eBMmJsYgU6fevv2NXqiIM6e3mKwlEXXBv0z\r\nHXNioHB+CVfypemwnuRsz9L7ytLCAgAdbJo3P5iwG3JTc2e65sAb95PdN+G0\r\n6lw+k/GaAG2iEzJTRcC78oQyW8rR3h1D9puOF+j/W1ClrRsCqRoxBTqOTFxu\r\nfHNtctjrgXk4nW8K14rS3c9GwEl+BlH9LsmdYYyIs6Sv9nDkSW6dHFt3dDvK\r\nAoqAs0t+LF3bTfQmCpKL6glNvzHJbKOhhVs5VyM0y0RgEoQOSsjZvitmLvTl\r\n9pCZclO1SXJ1QbEzHIl5qD9CUqCfiqTgNsg=\r\n=itMp\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"dbouckaert","email":"bouckaert.david@gmail.com"},"directories":{},"maintainers":[{"name":"dbouckaert","email":"bouckaert.david@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zephyr-scale-cloud-reporter_1.0.3_1678980210611_0.7011436049572395"},"_hasShrinkwrap":false},"1.0.4":{"name":"@dbouckaert/zephyr-scale-cloud-reporter","version":"1.0.4","description":"ZH Cloud, or zephyr helpers is a Node JS framework that implements test suites with Zephyr scale for Jira. It uses a soft-assert function to absorb failing assertions and translate them to a true/false value.","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1","start:dev":"nodemon"},"repository":{"type":"git","url":"git+https://github.com/davidbouckaert/zephyr-scale-cloud-reporter.git"},"keywords":["ZEPHYR","zapi","test","reporter","zephyr scale","jira","cloud","jira-cloud","mocha"],"author":{"name":"David Bouckaert"},"license":"MIT","bugs":{"url":"https://github.com/davidbouckaert/zephyr-scale-cloud-reporter/issues"},"homepage":"https://github.com/davidbouckaert/zephyr-scale-cloud-reporter#readme","dependencies":{"@types/chai":"^4.3.3","awesome-typescript-loader":"^5.2.1","chai":"^4.3.6","source-map-loader":"^4.0.0","supertest":"^6.2.4"},"devDependencies":{"@types/node":"^18.11.9","@types/supertest":"^2.0.12","@typescript-eslint/eslint-plugin":"^5.36.1","@typescript-eslint/parser":"^5.36.1","eslint":"^8.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-airbnb-typescript":"^17.0.0","eslint-config-prettier":"^8.5.0","eslint-config-standard":"^17.0.0","eslint-plugin-import":"^2.26.0","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^4.2.1","eslint-plugin-promise":"^6.0.1","nodemon":"^2.0.19","ts-loader":"^9.3.1","ts-node":"^10.9.1","typescript":"^3.9.10"},"gitHead":"dc7f8d09969c7926dc5450ab246a78c2aa187123","_id":"@dbouckaert/zephyr-scale-cloud-reporter@1.0.4","_nodeVersion":"16.8.0","_npmVersion":"8.19.1","dist":{"integrity":"sha512-CswalhfCm7MHKNrdKyIOaO/n2/wH65UD3kJfxFmRzChk8Jrx1w8dxUPYds2GhyHluY74fza3kypRNpDOPoZtEg==","shasum":"18f899e167e4c9aed1bc7c90ade945cfabd8be15","tarball":"https://registry.npmjs.org/@dbouckaert/zephyr-scale-cloud-reporter/-/zephyr-scale-cloud-reporter-1.0.4.tgz","fileCount":42,"unpackedSize":28570,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGsQu4V3rDvr2hgmSq22nS1s/VCFCanQ+QR+2A5bcHcPAiEAvjhRU51frXSxHvPIZMG+ZvYVQej5UcMy+k360xoYdyI="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGXpZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpY/xAAkkHKwvRmsrlxsETfyaKfuIyATBlCO4FRF4DMiaH4cgBmrH1T\r\nQsM1h6JdSJ+EU54MM997HGJxbsW8oLVT8G3gmrTQhsL9CEmu6RrB20DC7U6u\r\nFB9iDJtUZVm56rzsrUMZpfY4gWOx7kKyXWZZZSQ5fKRqg5e/rR5VN1X4EgtQ\r\nzGv2hgRZF6+FJf3PZwKRy+A8vJFi4BMLyTkcDgHh4bC1T7YMLuvwt0Ph0Edf\r\n6t9wbPrwZB14mmwZj6itE0in3VntT7WwKX33W8XfFZTA42XYd6Cs86vSCiii\r\nnLwSk58W+v5oJfITZay+sfF0IpueD0lp+zpF85socrsTrVZ5VLcZslyNKRL9\r\nqQFFqrltedj609LaGT6y+RaCSqoovMFXm/zR4uXNQNrOq8rGFFdCQ0nRf9B8\r\nIaZ8YvBM1awuz29Ov07l8M0KycAqtZv7WfU2UazvhMNXcxLoocH3iLjmN3HT\r\nhkcpxN39G/HKNWIShwH13qBI7aPsDii5uzbtuFNhybg6VIYW7tSABpWWe472\r\nm7MAHS3yEZCUqrT3iyx+2jLxF7iT2oodiFLMTHHlTy3WAhJC5NGTd+QYNVAr\r\nuY6QxKSYivd8LmCD7nPe3fUODB1dyQ1zUvE6KAJldlcEZdHeqnCbZtHez5yI\r\nZQArwAyUvKD9jqia9ZYdOf0ch9fmbkAOLw8=\r\n=KunP\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"dbouckaert","email":"bouckaert.david@gmail.com"},"directories":{},"maintainers":[{"name":"dbouckaert","email":"bouckaert.david@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zephyr-scale-cloud-reporter_1.0.4_1679391320988_0.8002153894166741"},"_hasShrinkwrap":false},"1.0.5":{"name":"@dbouckaert/zephyr-scale-cloud-reporter","version":"1.0.5","description":"ZH Cloud, or zephyr helpers is a Node JS framework that implements test suites with Zephyr scale for Jira. It uses a soft-assert function to absorb failing assertions and translate them to a true/false value.","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1","start:dev":"nodemon"},"repository":{"type":"git","url":"git+https://github.com/davidbouckaert/zephyr-scale-cloud-reporter.git"},"keywords":["ZEPHYR","zapi","test","reporter","zephyr scale","jira","cloud","jira-cloud","mocha"],"author":{"name":"David Bouckaert"},"license":"MIT","bugs":{"url":"https://github.com/davidbouckaert/zephyr-scale-cloud-reporter/issues"},"homepage":"https://github.com/davidbouckaert/zephyr-scale-cloud-reporter#readme","dependencies":{"@types/chai":"^4.3.3","awesome-typescript-loader":"^5.2.1","chai":"^4.3.6","source-map-loader":"^4.0.0","supertest":"^6.2.4"},"devDependencies":{"@types/node":"^18.11.9","@types/supertest":"^2.0.12","@typescript-eslint/eslint-plugin":"^5.36.1","@typescript-eslint/parser":"^5.36.1","eslint":"^8.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-airbnb-typescript":"^17.0.0","eslint-config-prettier":"^8.5.0","eslint-config-standard":"^17.0.0","eslint-plugin-import":"^2.26.0","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^4.2.1","eslint-plugin-promise":"^6.0.1","nodemon":"^2.0.19","ts-loader":"^9.3.1","ts-node":"^10.9.1","typescript":"^3.9.10"},"gitHead":"c644738023cd03f78de7f4e5a34b65d323dfd671","_id":"@dbouckaert/zephyr-scale-cloud-reporter@1.0.5","_nodeVersion":"16.8.0","_npmVersion":"8.19.1","dist":{"integrity":"sha512-adsW5Wrmg0ebto7VPncoUIcA5r/+3pRFVw7gopekKYzToIRn6EKayH6TnH9I+wj3uw1rIXEWRLGhKZG1l8thCg==","shasum":"a6e9ae33d9d9e4ec45aa4ff240b6804664f413e8","tarball":"https://registry.npmjs.org/@dbouckaert/zephyr-scale-cloud-reporter/-/zephyr-scale-cloud-reporter-1.0.5.tgz","fileCount":42,"unpackedSize":28590,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHCJab2VF0Q3LMm0OL9F/mc2tQa6ua1moaUthGd2hineAiEAv1H/2PC+pPx34p38l4tXkBaIz7EmyDsXtQyQlXQl2mI="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGXqaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpATg/+OnozUMnsWqwk8yOk9lw54dt2CQh3n/Nn2XryU/28zP41xFFj\r\nZHxscid1XrhMdIhE22fRW5dVbKKblzxVMfLEqOmQe4gVBStFoj7x/XlTNJaw\r\nCEG3T8MC8KohaLAx4p7wtRpx5Lgfb47IBhRVKSPGI5dkVwwogfkzEUeY8sZp\r\nPydaazCQLGsQ3N51oIoTDaT7FLgqJGzL6bcVt5TzlSj1EX9YpPLOioPhSGL2\r\nGrFg2ZVNRpSqCkRe6ibaQK2a2w9x+5EJAr+A1dv7impYYFpgArj4/0c7XHx9\r\nZweHl5E/J7/gMvDnl+DIPZimaPQ8793PE7Ib3hnNmYxpA2MIL0p50Upvx6DV\r\n5aIXr0BbFMvLPLmBpjhvkcp/IH+YeMRm0eCRk3RaB79Itvx+jWqmM/pn6p7a\r\nKHPzRTl+ky05a8RTsDLBHp8z9FsD7GY5L8Ur82M21M/tAA+pm1K/nB31mV7l\r\neFUFRsviN6xaOZZj30+D7/m7IwxLEr/VbD4WtGm0gn9Xtgwt7Ot7nLlg42lH\r\nOI3d68VWWmnwAMMqbhPZaaDtAwo423VchBEi6fH0LzOAlXTCwTiwRHYlth6p\r\n7L0mQLFquCThrd2W/l8624FmB3dEeoY4vwcyJlarOl9wuFx+nJNtyfbWr6Ng\r\nqf4Esz+WSrkajTXdm0g8teZxy16kZk+mm+A=\r\n=lmE4\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"dbouckaert","email":"bouckaert.david@gmail.com"},"directories":{},"maintainers":[{"name":"dbouckaert","email":"bouckaert.david@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zephyr-scale-cloud-reporter_1.0.5_1679391386586_0.5955421899709084"},"_hasShrinkwrap":false}},"time":{"created":"2023-03-16T15:23:30.496Z","1.0.3":"2023-03-16T15:23:30.859Z","modified":"2023-03-21T09:36:26.930Z","1.0.4":"2023-03-21T09:35:21.191Z","1.0.5":"2023-03-21T09:36:26.797Z"},"maintainers":[{"name":"dbouckaert","email":"bouckaert.david@gmail.com"}],"description":"ZH Cloud, or zephyr helpers is a Node JS framework that implements test suites with Zephyr scale for Jira. It uses a soft-assert function to absorb failing assertions and translate them to a true/false value.","homepage":"https://github.com/davidbouckaert/zephyr-scale-cloud-reporter#readme","keywords":["ZEPHYR","zapi","test","reporter","zephyr scale","jira","cloud","jira-cloud","mocha"],"repository":{"type":"git","url":"git+https://github.com/davidbouckaert/zephyr-scale-cloud-reporter.git"},"author":{"name":"David Bouckaert"},"bugs":{"url":"https://github.com/davidbouckaert/zephyr-scale-cloud-reporter/issues"},"license":"MIT","readme":"## What is ZH Cloud?\r\n\r\nZH Cloud, or zephyr helpers is a Node JS framework that implements test suites with [Zephyr scale](https://marketplace.atlassian.com/apps/1213259/zephyr-scale-test-management-for-jira?tab=overview&hosting=cloud) for Jira.\r\n\r\nIt uses a soft-assert function to absorb failing assertions and translate them to a true/false value.\r\n\r\n## Installing\r\n\r\n[![npm version](https://badge.fury.io/js/@dbouckaert%2Fzh.svg)](https://badge.fury.io/js/@dbouckaert%2Fzh)\r\n\r\nInstall ZH Cloud for Mac, Linux, or Windows\r\n\r\n```bash\r\nnpm install @davidbouckaert/zephyr-scale-cloud-reporter --save-dev\r\n```\r\n\r\n## License\r\n\r\n[![license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/cypress-io/cypress/blob/master/LICENSE)\r\n\r\nThis project is licensed under the terms of the [MIT license](/LICENSE).\r\n\r\n## Getting started\r\n\r\nInclude the module into your test suite.\r\n`const zh = require('@davidbouckaert/zephyr-scale-cloud-reporter')`\r\n\r\n### Initiation\r\n\r\nThe first thing you'll want to do is to call the function `init()`\r\nIt populates the framework with critical information.\r\nOne option is to do this inside of the `before` block.\r\n\r\n```js\r\nbefore(async function () {\r\n  // FIRST: setting variables for zephyrHelpers (without the project ID)\r\n  await zephyrHelpers.init({\r\n    zephyrURL: 'https://<url.to.your.jira.env>',\r\n    jiraURL: 'https://<url.to.smartbear>',\r\n    zephyrApiToken: ,\r\n    jiraApiToken: ,\r\n    zephyrProjectKey: 'TEST01',\r\n    zephyrFolderName: 'My_test_cases',\r\n    environment: 'TEST4',\r\n    jiraDisplayName: 'My Name'\r\n    defaultJiraId: 'JIRAUSER123',\r\n  });\r\n});\r\n```\r\n\r\n_Note: don't store clear text passwords in your repository._\r\n\r\n### Example use case\r\n\r\nExplenation:\r\nThere are 2 variables defined to store the result of the GET call: `payloadResult` & `responseCodeResult`.\r\nA varable `testName` is created that holds the exact name of the test case in Zephyr Scale.\r\nAnother variable `testrunId` is being created, it's value is set by calling the function `createNewTestrun`, 2 parameters are passed (as an object):\r\n\r\n- testcaseArray: the test case array (from our before block)\r\n- name: the test case name\r\n\r\nThen the REST call is executed, and afterwards (.then) the value of `payloadResult` & `responseCodeResult` are being set.\r\nUsing the `softAssert` method:\r\n\r\n- `responseCodeResult` `softAssert.equals()` is comparing if two parameters are an exact match and returns `true` or `false`.\r\n- `payloadResult` `softAssert.includes()` is checking if the value of parameter 'B' is included in parameter 'A' and returns `true` or `false`.\r\n\r\nNext up: calling the `updateTestResult()` function. This sends the result over to Zephyr Scale, making it visible in the test case (tab executions).\r\n\r\nFinally: calling the `softAssert.assertAll()` function. This function checks if any error were absorbed during the soft-asserts. If there are, the errors are logged in the console, and the test runner will mark the test as failed.\r\n_**Note: your CI system will also mark the job/run as failed**_\r\n\r\n```js\r\nit('Call /users without authorisation header', async function () {\r\n  let payloadResult, responseCodeResult;\r\n  const testName = 'GET /users without authorisation header (Sad flow)';\r\n\r\n  await request(baseURL)\r\n    .get(\r\n      `/users?id=${getUser.id}&userIdentification=${getUser.userIdentification}&username=${getUser.username}`\r\n    )\r\n    .then((res) => {\r\n      responseCodeResult = zephyrHelpers.softAssert.equals(res.statusCode, 401);\r\n      payloadResult = zephyrHelpers.softAssert.includes(\r\n        res.body.error,\r\n        'Unauthorized'\r\n      );\r\n    });\r\n\r\n  zephyrHelpers.createNewTestExecution(\r\n    status,\r\n    env,\r\n    folderName,\r\n    testName,\r\n    testCycleName\r\n  );\r\n  await zephyrHelpers.softAssert.assertAll();\r\n});\r\n```\r\n","readmeFilename":"README.md"}