{"id":31934354,"url":"https://github.com/testomatio/migrate-xray","last_synced_at":"2025-10-14T06:25:46.665Z","repository":{"id":253320464,"uuid":"843148297","full_name":"testomatio/migrate-xray","owner":"testomatio","description":"XRay ➡ Testomat.io migration script","archived":false,"fork":false,"pushed_at":"2025-06-25T21:38:32.000Z","size":562,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-25T22:34:14.297Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/testomatio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2024-08-15T22:13:48.000Z","updated_at":"2025-05-14T20:44:44.000Z","dependencies_parsed_at":"2024-08-15T23:32:34.762Z","dependency_job_id":"04410f29-0610-4330-b294-99ba7e88b919","html_url":"https://github.com/testomatio/migrate-xray","commit_stats":null,"previous_names":["testomatio/migrate-xray"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/testomatio/migrate-xray","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testomatio%2Fmigrate-xray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testomatio%2Fmigrate-xray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testomatio%2Fmigrate-xray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testomatio%2Fmigrate-xray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/testomatio","download_url":"https://codeload.github.com/testomatio/migrate-xray/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testomatio%2Fmigrate-xray/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018120,"owners_count":26086281,"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":[],"created_at":"2025-10-14T06:25:45.550Z","updated_at":"2025-10-14T06:25:46.653Z","avatar_url":"https://github.com/testomatio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XRay ➡ Testomat.io Migration Script\n\nThis script migrates test cases from XRay to [Testomat.io](https://testomat.io) via API.\n\nYou are free to customize this script if the default behavior doesn't fit your needs.\n\n## Set Up Locally\n\n* Ensure **NodeJS 20+** is installed\n* Clone this repository\n* Copy `.env.example` to `.env`\n\n```\ncp .env.example .env\n```\n\n* Obtain [Jira API token](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/) from Jira\n* Fill in Jira credentials into `.env` file\n\nYou should specify this variables in `.env` file:\n```\nJIRA_USERNAME=\nJIRA_TOKEN=\nJIRA_PROJECT_ID=\n```\n\n* Obtain XRay token from XRay app\n\n\u003e [!IMPORTANT]\n\u003e Due to unavaibility of XRay API, you need to obtain token manually.\n\nOpen XRay app, open DevTools (F12), go to Network tab, and find XRay requests by filtering Network Requests by URL:\n\n```\nurl:xray.cloud.getxray.app\n```\n\nFind any request to XRay API, and in `Headers` tab find `X-Acpt` header. This is your token.\n\nCopy it to `.env` file as `XRAY_INTERNAL_TOKEN` value\n\n\nAlso you will need XRAY URL to send request to. It can from be taken from `Origin`\n\nThe value would probably be one of those:\n\n* `https://eu.xray.cloud.getxray.app`\n* `https://us.xray.cloud.getxray.app`\n\nSet it into `.env` as `XRAY_URL`\n\n![](./assets/xray_token.png)\n\nThe XRAY config in `.env` file should specify these variables:\n\n```\nXRAY_URL=\nXRAY_INTERNAL_TOKEN=\n```\n\n\u003e [!TIP]\n\u003e It is possible to import a single folder from XRay. Open a XRay folder in a Test Repository and copy current URL, find `selectedFolder=` param with a folder ID as value. Copy this value from URL and set as `XRAY_FOLDER_ID` in `.env` file.\n\n* Fill in Testomat.io credentials into `.env` file\n* Create [General Token](https://app.testomat.io/account/access_tokens) in Testomat.io\n* Fill in Testomat.io credentials into `.env` file\n\n```\nTESTOMATIO_TOKEN=testomat_****\nTESTOMATIO_PROJECT=**\n```\n\n\u003e `TESTOMATIO_PROJECT` is a project URL part, e.g. for `https://app.testomat.io/projects/your-project` it is `your-project`\n\n* Install dependencies\n\n```\nnpm i\n```\n\n* Run script\n\n```\nnpm start\n```\n\n## Troubleshooting\n\n#### Authentication request has expired. Try reloading the page\n\nIf you see error like this:\n\n```\nError fetching data: Error: Failed to fetch data: /test-repository: 401 Unauthorized\n{\"error\":\"Authentication request has expired. Try reloading the page.\"}\n```\n\nTry to open XRay app and fetch a new token and run script again.\n\n## Known Limitations\n\n* **Test Params are not obtained** from a test case, as they are not availble in XRay API\n* If test calls steps from another test, this test should be imported first, otherwise you will get `[steps from a missing XRay test]` in a test description\n\n## Debugging\n\nTo enable more verbose output you can add debug flags via `DEBUG=` environment variable:\n\n* `DEBUG=\"testomatio:xray:in\"` - print all data coming from XRay\n* `DEBUG=\"testomatio:xray:out\"` - print all data posting to Testomat.io\n* `DEBUG=\"testomatio:xray:migrate\"` - print all data processing\n* `DEBUG=\"testomatio:xray:*\"` - print all debug information\n\n```\nDEBUG=\"testomatio:xray:*\" npm start\n```\n\n## Customization\n\nWe keep this repository public, so you could customize the data you import.\n\nUpdate `migrate.js` script to customize how sections, suites, and cases are obtained. You can customize the way how steps are transformed or test descriptions.\n\nUpdate the following file and run the script.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestomatio%2Fmigrate-xray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftestomatio%2Fmigrate-xray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestomatio%2Fmigrate-xray/lists"}