update the execution status of a test case using jira rest api

rayudu October 23, 2017

Hi All, Warm Regards, I have created test cases in JIRA test management tool. Automated the test cases using ready API. I want to update the test case status (Pass/Fail) Using jira rest api. Can some one pls help.

I referred the following link:

https://docs.atlassian.com/jira/REST/cloud/#api/2/workflowscheme-updateDraftDefault

 

 

4 answers

1 vote
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 18, 2020

Hi everyone,

This question is rather old, but I wanted to try to update the answers here.  Natively, Jira does not do test management.  There are however several plugins in Marketplace that can help make that a reality.  A few that I am aware of are Zephyr, Xray, TM4J, and many more which you can find in a search of Marketplace.

I am not sure which one might have been referred to by 'Jira test management tool'.  I am afraid that title is a bit vague to me, and sometimes plugins/apps can have their titles change in marketplace.

That said, because these apps add functionality to Jira, I don't have the expectation that Jira's native REST API will be able to manipulate these entities like standard Jira issue types.  As such, it would be best to reach out to the plugin vendor to see if there does exist a REST API for managing these.  I found some such as

I hope this helps.  If not, it would probably be best to reach out to the specific plugin vendor for support on this topic.

Thanks

Andy

0 votes
rayudu October 24, 2017

Also, First i want to read the test cases which i have drafted in JIRA test management. Then want to update the test case status to PASS/FAIL using jira REST API.

 

Please do the needful.

Jenkins Auto March 5, 2019

Hi rayudu,  How are you?

Are you able to update the status to PASS/FAIL using REST API now?

I want to do the same and not able to after searching for so long. I posted this question. 

I am able to query using JQL as suggested but still not able to filter and update the status of my test execution

https://community.atlassian.com/t5/Jira-questions/Retrieving-and-Updating-an-issue-s-status-via-the-rest-API/qaq-p/1025142?utm_source=atlcomm&utm_medium=email&utm_campaign=immediate_general_answer&utm_content=topic

Hope to know how it went for you.

Thanks

Sam

0 votes
rayudu October 24, 2017

Hi Gregor,

Thanks for reply.

Using post method:

https://xxxxxx/rest/api/2/issue/testcaseid/transitions?expand=transitions.fields 

Payload:-

{
"update":{
"name": "In Progress",
"id": "3"
},

"transition": {
"id": "21"
}
}

Still not working

Gregor Kasmann_Actonic
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 25, 2017

Do you have any error message?

0 votes
Gregor Kasmann_Actonic
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 24, 2017
Bindhu November 25, 2019

Hi Gregor,

The above link which u have shared is for changing the status of issue. Can you please share the details of how to change the execution status of any issue?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events