0

Currently i can update test cases by test point ID. But in my testcases i have only testcase ID, I want to update the test cases throught rest api and using test cases ID

Using test point ID i can update the outcome (Test result) but i want to update the result using test cases ID

curl 'https://dev.azure.com/yec-proj/deslor/_apis/testplan/Plans/10085/Suites/91235/TestPoint?includePointDetails=true&returnIdentityRef=true' \
  -X 'PATCH' \
  -H 'authority: dev.azure.com' \
  -H 'accept: application/json;api-version=6.1-preview.2' \
  -H 'accept-language: en-US,en;q=0.9' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'origin: https://dev.azure.com' \
  -H 'pragma: no-cache' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Windows"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-origin' \
  -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36' \
  -H 'x-tfs-session: 96a5552-71f8-4a1f-96ed-88fd785520af8' \
  -H 'x-vss-reauthenticationaction: Suppress' \
  --data-raw '[{"id":270463,"results":{"outcome":2}}]' \
  --compressed

Can anyone help me to find out the solutions?

Zakaria Shahed
  • 2,589
  • 6
  • 23
  • 52
  • Hi, Is there any update about this ticket? Feel free to let me know if the answer could give you some help. Just a remind of [accept answer](https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work). – Dou Xu-MSFT Dec 29 '22 at 06:09

1 Answers1

1

First of all, you should understand the mapping relationship between Test Cases and Test Points. One Test Case can be associated with multiple Test points.

For example, there’re two Test Points whose title both are username but associate one Test Case whose Test Case Id is 22 .Ones configuration is windows 10,another is windows 8.

test points

Therefore, when you want to update the outcome of a Test Point by Test Case Id, it’s unclear which Test point you want to update. I’m afraid there’s no supported REST API to update outcome of Test Point directly via Test Case Id from MS doc at present. However, there’s a flexible way to update test result by Test Case ID:

1 Get a particular Test Case from a Suite. You can get PointAssignment information that includes Test points by Test Case ID using this REST API . Please refer to doc: Suite Test Case - Get Test Case - REST API For example in postman: test in postman

2 use Test point ID getting from the step 1 to update outcome of test case via Test Point Update REST API.

Dou Xu-MSFT
  • 880
  • 1
  • 1
  • 4