Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,560,577
Community Members
 
Community Events
185
Community Groups

How to update the Test Execution result of a particular Test Step within it using REST api?

Edited

Hi,

I'm trying to update the Test Execution result of a particular Test Step within it using REST api. I referred the Test Step Results - REST documentation, however, the solution doesn't produce the output that I expect. Here are the detailed steps that I followed:

  1. Created a Test Execution using REST.
    Request: curl -H "Content-Type: application/json" -X POST -u admin:admin --data @test-execution.json http://{XRAY-Server}/rest/raven/1.0/import/execution
    Response: {"testExecIssue":{"id":"48033","key":"XRAYT-362","self":"http://{XRAY-Server}/rest/api/2/issue/48033"}}
  2. Update the same Test Execution for a particular Test Step
    JSON: test-execution-update.json
    {
       "id":"48033",
       "status":"FAIL",
       "comment":"Expected '5' to equal '10'.",
       "evidences":[
          {
             "data":"iVBORw0KGgoAAAANSUhEUgAA..[base64-image]",
             "filename":"screenshot.png",
             "contentType":"image/png"
          }
       ],
       "actualResult":"The actual result for 1177"
    }

    Request: curl -H "Content-Type: application/json" -X PUT -u admin:admin --data @test-execution-update.json http://{XRAY-Server}/rest/raven/1.0/api/testrun/48033/step/1176/
    Response: Test Run with Id 48,033 was not found in the server

As you can see the Test Run id is used later is same as was generated by the earlier response. So it's weird to get such response.

Has anyone faced such issue? Any help would be much appreciated.
Thanks in advance :)

 

Regards,
Siddhesh Malpani

 

1 answer

0 votes
José Domingues [Xray]
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
Jun 16, 2020 • edited

Hi @Sid , 

The ID that you're using is the Issue Id of the Test Execution, not the Test Run ID.
To fetch the Test Run ID, please follow the guide of our support documentation: https://confluence.xpand-it.com/display/public/XRAY/Test+Runs+-+REST

If you have any questions, please contact our support service desk.

Best Regards,

Team Xray

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events