Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to use the REST API to find the Test Run ID without knowing Test Exec Key?

Lindsay Herron September 20, 2022

With testrun issue types, there are two statuses:

  1. Issue Status: In Use, Accepted, Rejected, ...
  2. Test Run Status: PASS, FAIL, ABORTED, ...

With ONLY the testrun key (no testexec key), so TEST-123, how can I change the testrun status? Or find the ID of the issue.

How to achieve it in the end is simple via PUT, but it requires me knowing the issue ID already:

.../rest/raven/1.0/api/testrun/<issueID>/status?status=<statusTYPE>

  • where <issueID> is the ID of the TEST-123 issue
  • <statusTYPE> is PASS, FAIL, ABORTED, ...

As for the header, I would only need:

headersStatus = {
            "Authorization": "Basic " + self.user_password,
            "Content-Type": "application/json",
        }
Missing information is then only the issueID.

1 answer

1 accepted

0 votes
Answer accepted
Lindsay Herron September 21, 2022
Solved the issue ourselves:
link = r".../rest/raven/1.0/test/{testRunKey}/testrun"
With GET, returns a dictionary with an "entries" key.
"entries" contains the test execution information and the testRunId.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, mindful member, mindful member badge, atlassian community, community kudos, community giveaway, atlassian swag, community values, empathy and kindness, badge challenge, atlassian learning, community engagement, swag giveaway

Earn a Badge, Win a Prize 🎁

Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!

Start here
AUG Leaders

Atlassian Community Events