{"id":15270307,"url":"https://github.com/prashanth-sams/qmetry-cucumber","last_synced_at":"2026-02-19T05:03:08.318Z","repository":{"id":257800592,"uuid":"863047214","full_name":"prashanth-sams/qmetry-cucumber","owner":"prashanth-sams","description":"Sync cucumber automation test results with Qmetry Test Cycle","archived":false,"fork":false,"pushed_at":"2024-10-08T09:56:49.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-03T20:31:09.257Z","etag":null,"topics":["automation","bdd","cucumber","qmetry","qmetry-cucumber","qmetryintegration","qtm4j","report","reporter","reporting","results","test","testing"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/qmetry-cucumber/","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/prashanth-sams.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"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-09-25T16:13:17.000Z","updated_at":"2024-10-08T09:56:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"d2a28f31-2aec-49a7-b2c7-7ab4fe543b4f","html_url":"https://github.com/prashanth-sams/qmetry-cucumber","commit_stats":null,"previous_names":["prashanth-sams/qmetry-cucumber"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/prashanth-sams/qmetry-cucumber","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashanth-sams%2Fqmetry-cucumber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashanth-sams%2Fqmetry-cucumber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashanth-sams%2Fqmetry-cucumber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashanth-sams%2Fqmetry-cucumber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prashanth-sams","download_url":"https://codeload.github.com/prashanth-sams/qmetry-cucumber/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashanth-sams%2Fqmetry-cucumber/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019610,"owners_count":26086760,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["automation","bdd","cucumber","qmetry","qmetry-cucumber","qmetryintegration","qtm4j","report","reporter","reporting","results","test","testing"],"created_at":"2024-09-30T07:08:00.437Z","updated_at":"2025-10-14T16:59:02.104Z","avatar_url":"https://github.com/prashanth-sams.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![NPM Version](https://img.shields.io/npm/v/qmetry-cucumber)\n![NPM Downloads](https://img.shields.io/npm/dy/qmetry-cucumber)\n\n# qmetry-cucumber\n![qmetry-cucumber](https://github.com/user-attachments/assets/e2634d60-e8f6-4739-8d07-f67b90742376)\n\n\u003cp align=\"center\"\u003e\u003cb\u003eSync cucumber automation test results with Qmetry Test Cycle\u003c/b\u003e\u003c/p\u003e\n\n## Getting Started\n```\nnpm install --save-dev qmetry-cucumber\n```\n\n## How to use\n\n#### Case #1 Open API\n\n\u003e Create `qmetry.config.json` file in the test project's root folder and add the below configurations.\n\n##### qmetry.config.json\n```\n{\n    \"baseUrl\": \"https://\u003cyour base url\u003e\",\n    \"apiKey\": \"\u003cproject api key\u003e\",\n    \"authorization\": \"\u003cjira auth creds encoded by base64\u003e\",\n    \"projectId\": \u003cyour project id\u003e,\n    \"testCycleId\": \u003cyour test cycle id\u003e,\n    \"summary\": \"\u003ctest summary\u003e\",\n    \"description\": \"\u003ctest description\u003e\"\n}\n```\nHere, `testCycleId`, `summary` and `description` fields are optional.\n\n##### Feature\n```\nScenario: [PRO-TC-1] [PRO-TC-2] User logs in with valid credentials\n        When User login with the username \"\u003cUSERNAME\u003e\" and password \"\u003cPASSWORD\u003e\"\n        Then User should be logged in successfully\n\n        Examples:\n        |   USERNAME   |   PASSWORD       |\n        |   admin      |   amin           |\n```\n\n##### hooks.ts\n```\nimport { updateQmetryStatus } from \"qmetry-cucumber\";\n\nAfter(async function ({ pickle, result }){\n    updateQmetryStatus(pickle.name, result.status);\n});\n```\n\n\n#### Case #2 Automation API\n\n\u003e Submit the Cucumber test output in JSON format to QMetry using the Automation API. To achieve this, create a `qmetry.config.json` file in the root directory of your test project and add the following configurations.\n\n##### qmetry.config.json\n```\n{\n    \"baseUrl\": \"https://\u003cyour base url\u003e\",\n    \"authorization\": \"\u003cjira auth creds encoded by base64\u003e\",\n    \n    \"automationApiKey\": \"\u003cautomation api key\u003e\",\n    \"automation\": {\n        \"format\": \"cucumber\"\n    }\n}\n```\nHere, `baseUrl`, `authorization`, `projectId`, `automationApiKey`, and `automation \u003e format` are the only mandatory fields. For more optional fields, check below:\n\n```\n{\n    \"baseUrl\": \"https://\u003cyour base url\u003e\",\n    \"authorization\": \"\u003cjira auth creds encoded by base64\u003e\",\n    \"projectId\": 0,\n    \n    \"automationApiKey\": \"\u003cautomation api key\u003e\",\n    \"automation\": {\n        \"format\": \"cucumber\",\n        \"attachFile\": true,\n        \"isZip\":false,\n        \"build\":\"\",\n        \"fields\":{ \n            \"testCycle\":{ \n                \"labels\": [\"\u003cyour label\u003e\"],\n                \"status\":\"Done\",\n                \"summary\": \"\u003ctest cycle summary\u003e\",\n                \"description\": \"\u003ctest cycle description\u003e\",\n                \"customFields\": [\n                    {\n                        \"name\": \"\u003cfield name; say., Environment\u003e\",\n                        \"value\": \"\u003cfield value; say., DEV\u003e\"\n                    }\n                ]\n            },\n            \"testCase\":{ \n                \"labels\": [\"\u003cyour label\u003e\"],\n                \"description\": \"\u003ctest case description\u003e\",\n                \"customFields\": [\n                    {\n                        \"name\": \"\u003cfield name; say., Environment\u003e\",\n                        \"value\": \"\u003cfield value; say., DEV\u003e\"\n                    }\n                ]\n            }\n        }\n    }\n}\n```\n\n##### \u003cyour_custom_file\u003e.ts\nInvoke the `sendTestResultToQmetry` function immediately after executing the cucumber tests.\n```\nimport { sendTestResultToQmetry } from \"qmetry-cucumber\";\n\nexecSync(`npx cucumber-js --config=config/cucumber.js --tags \"@smoke\"`, { stdio: 'inherit' });\nsendTestResultToQmetry(process.cwd() + '/test-result/reports/cucumber-report.json');\n```\n\n## Test\n```\nnpm test\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprashanth-sams%2Fqmetry-cucumber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprashanth-sams%2Fqmetry-cucumber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprashanth-sams%2Fqmetry-cucumber/lists"}