{"id":19792048,"url":"https://github.com/xray-app/xray-cloud-demo-project","last_synced_at":"2025-05-01T02:30:22.389Z","repository":{"id":119027862,"uuid":"298308243","full_name":"Xray-App/xray-cloud-demo-project","owner":"Xray-App","description":"Script for creating a demonstration project in Xray cloud.","archived":false,"fork":false,"pushed_at":"2024-03-27T11:57:27.000Z","size":725,"stargazers_count":3,"open_issues_count":3,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-06T07:37:31.132Z","etag":null,"topics":["jira","xray"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Xray-App.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2020-09-24T14:44:25.000Z","updated_at":"2023-05-15T12:36:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"111728ad-cf0b-4088-8e18-041820369e74","html_url":"https://github.com/Xray-App/xray-cloud-demo-project","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xray-App%2Fxray-cloud-demo-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xray-App%2Fxray-cloud-demo-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xray-App%2Fxray-cloud-demo-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xray-App%2Fxray-cloud-demo-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xray-App","download_url":"https://codeload.github.com/Xray-App/xray-cloud-demo-project/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251812224,"owners_count":21647866,"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","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":["jira","xray"],"created_at":"2024-11-12T07:05:47.042Z","updated_at":"2025-05-01T02:30:22.036Z","avatar_url":"https://github.com/Xray-App.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"This script creates a demonstration project for [Xray](https://www.getxray.app/) in [Jira Cloud Software](https://www.atlassian.com/software/jira/free).\n\nThe created demo project contains:\n - *Requirement* (i.e., coverable) issues, namely Epics and Stories \n - Test cases (Manual, Cucumber, Robot Framework, Nunit, JUnit, TestNG)\n - Preconditions\n - Test Sets\n - Test Repository folder structure\n - Test Plans\n - Test Executions\n\n# Description\n\nThe [resources/data.json](./resources/data.json) file contains all the information to create the initial issues and their associations.\nThere are also other resource files used to import execution results in various technologies.\n\nThe script uses APIs from Jira and Xray to create all the entities based in these resources.\n\n - [demo.py](./demo.py) main script file. Drives the flow by consuming the resource files and sending the appropriate API requests\n - [credentials.py](./credentials.py) configuration file; you need to update it (more info ahead)\n\n\nThere are also some auxiliary files:\n\n - [resources/](./resources/) the resources folder where the data and execution result files can be found\n - [jira.py](./jira.py) Jira API helper\n - [xray.py](./xray.py) Xray API helper \n\n# Prerequisites\n\n * A [Jira Cloud Software](https://www.atlassian.com/software/jira/free) instance with [Xray](https://www.getxray.app/) installed\n * A Jira user email and respective API TOKEN: (https://confluence.atlassian.com/cloud/api-tokens-938839638.html)\n * An Xray API Key: (https://docs.getxray.app/display/XRAYCLOUD/Global+Settings%3A+API+Keys)\n * The script is written in [Python](https://www.python.org/). You must install [Python 3.x](https://www.python.org/about/gettingstarted/) in order to execute the script.\n\n# How to use\n\n## Setup\n\nIn order to run this script you need to provide the following information in the [credentials.py](./credentials.py) file:\n - Jira Instance URL\n - Jira user email\n - Jira API token\n - Xray API Key (client and secret)\n\n```python\n# Jira credentials\nINSTANCE = 'https://my-xray-demo.atlassian.net'\nUSER = 'xxxx'\nTOKEN = 'xxxx'\n\n# Xray credentials\nCLIENT_ID = 'XXXXXXXXXXXXXXXXXX'\nCLIENT_SECRET = 'XXXXXXXXXXXXXXXXXX'\n```\n\n## Running the script\n\n```\n\u003e pip3 install -r requirements.txt\n\u003e python3 demo.py\n\nusage: demo.py [-h] [-s] [-v]\n\noptional arguments:\n  -h, --help     show this help message and exit\n  -s, --salt     appends 3 random chars to the project name (useful if you already have a project with the same name or key)\n  -v, --verbose  enables verbose logging\n```\n\n## Final steps\n\nBy now, you should have a new project named \"Book Store Web app\" in your Jira instance. There are just a couple of things you need to do:\n\n1. Configure the **Test Coverage** and **Defect Mapping** on the Xray project settings.\n2. Create a dashboard to demonstrate Xray Gadgets and reports.\n\n... and thats it.\n\n![Test Coverage Config](./resources/coverage.png \"Test Coverage Config\")\n![Defect Mapping Config](./resources/defects.png \"Defect Mapping Config\")\n\n# Future work\n\nThe [jira.py](./jira.py) and [xray.py](./xray.py) files are just abstractions of the respective APIs. We can improve these abstractions in order to support different data and fields specified in the [data.json](./resources/data.json) file.\n\n# License\n\nLicensed under the New BSD License. See the [LICENSE](./LICENSE.md) file for details.\n\n# Disclaimer\n\nPlease note: the scripts in this repo are released for use \"AS IS\" without any warranties of any kind, including, but not limited to their installation, use, or performance. We disclaim any and all warranties, either express or implied, including but not limited to any warranty of noninfringement, merchantability, and/ or fitness for a particular purpose. We do not warrant that the technology will meet your requirements, that the operation thereof will be uninterrupted or error-free, or that any errors will be corrected.\n\nAny use of these scripts is at your own risk. There is no guarantee that they have been through thorough testing in a comparable environment and we are not responsible for any damage or data loss incurred with their use.\n\nYou are responsible for reviewing and testing any scripts you run thoroughly before use in any non-testing environment.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxray-app%2Fxray-cloud-demo-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxray-app%2Fxray-cloud-demo-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxray-app%2Fxray-cloud-demo-project/lists"}