We have test cases in VSTS under our project. We are using rest Api to get test case details and trying to update the outcome of test case as pass
or fail
based on some condition but not able to find the reference field for the outcome.
Below is my code:
var collectionUri = "https://microsoft.visualstudio.com/DefaultCollection";
VssBasicCredential _credentials = new VssBasicCredential("", "<PATToken>");
// create workitemtracking client
var _witClient = new WorkItemTrackingHttpClient(new Uri(collectionUri), _credentials);
// get Test Case using all relations
var testCaseObject = _witClient.GetWorkItemAsync(<testcaseid>, null, null, WorkItemExpand.Relations).Result;
In testCaseObject
, we are getting all the fields related to testcase but not have any field related to outcome. Please help us here how to update and save the outcome for the test case in VSTS.