Hello Community,
Have anyone tried uploading test cases and test run status using REST API. I would like to know the JSON format for adding test steps and updating the result of test steps.
I am able to create test case using below request but would like to include the steps for the test cases.
welcome to the community.
I guess you are using jira native rest API to create the issue. (xray uses it‘s own rest api)
As far as I know there is no action to just add steps to an existing issue (at least not in cloud). Nevertheless this should be possible with importing JSON via the xray Rest API. see the following link. It describes how to import as well as the JSON tempate format.
https://docs.getxray.app/pages/viewpage.action?pageId=68411323
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Stefan Salzl ,
Thanks for your reply.
Please find my questions below,
1) Response what I could see from the page in the form of job id rather than the actual test case # which we used to get in the same JIRA server API endpoint in the response. As part of cloud, do we need to first start the bulk job using endpoint "POST /api/v2/import/test/bulk" and then get the test case id once it successful using "GET /api/v2/import/test/bulk/{jobId}/status" endpoint. (For existing test execution)
2) How do I know which are the mandatory fields in the request I am sending (For existing test execution)
3) Will I be able to execute only the test case or is it compulsory to execute the steps within the test case (For existing test execution)
Looking forward for your response.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
let‘s take one step back as I am not sure I can follow what you are trying to achieve. Could you please explain your whole use case from a kind of more functional/use case perspective? (I‘m was getting confused between test case and test execution so I‘m not quite sure whether you want to import a test case or test execution).
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please find my whole use case below,
1. Import new test cases for existing test execution
2. Import test execution for the imported test cases
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you using xray test management plugin? which type of test case would you like to import? which test execution file would you like to import?
Could please specify part 1 in more details? what exactly do you mean with "new testcases for existing test execution"? do you mean an already existing test execution issue within jira? or an executed test in your SUT that you would like to make it visible in Jira?
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Stefan Salzl,
Apologies for the late response.
Please find my answers below,
1. Are you using xray test management plugin? which type of test case would you like to import? which test execution file would you like to import? ==> No, i am not using the plugin. I would like to import 'Manual' test cases into JIRA cloud for a 'Test Set'. I used to use below end points in JIRA server for uploading my test cases
rest/api/3/issue/
2. Could please specify part 1 in more details? what exactly do you mean with "new testcases for existing test execution"? do you mean an already existing test execution issue within jira? or an executed test in your SUT that you would like to make it visible in Jira? ==> My bad. I uI'll rephrase it correctly. I used to upload my test cases to a test set and execute them in text executions.
Hope it answers your question.
Thanks,
Hari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this brings even more questions up as everything what you describes sounds like configurations/issue types from xray.
Could you maybe show a screenshot of your issues (test cases, test set,…) ?
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.