How to get test case execution of a test case with context of a Test Suite..?

Muhammad Jalees 0 Reputation points
2023-09-21T06:26:57.3833333+00:00

How to get test case execution of a test case with context of a Test Suite…?? if the same test case is present in another test suite, I do not want it, its information is irrelevant to me.

I am using the code, but it is not behaved as expected.

I have also attached the expected output (image). (there are 2 test results present and it is correct)

By using the code, what I get, is also attached in json format, and it is not matched with the expected output. (I get only 1 test result)

Kindly help me out, thanks in advance.

<

{
using System;
// Assembly Microsoft.TeamFoundationServer.Client.16.205.1\lib\net462\Microsoft.TeamFoundation.TestManagement.WebApi.dll

using TFSRestApi = Microsoft.TeamFoundation.TestManagement.WebApi;

public class QueryRunner
{
    
private void GetTestResultByPointId()
    {
        try
        {
            TFSRestApi.TestResultsQuery query = new TFSRestApi.TestResultsQuery();

TFSRestApi.ResultsFilter filter = new TFSRestApi.ResultsFilter();
            //manual test so I set to empty string
            filter. AutomatedTestName = "";
            //test case id
            filter. TestCaseId = 1109; 

List
Community Center | Not monitored
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ommi Naveen Kumar 195 Reputation points Moderator
    2023-09-21T11:49:10.2166667+00:00

    Hello @Muhammad Jalees

    Welcome to Microsoft Q&A Platform, thanks for posting your query here. Azure DevOps related queries/issues are currently not supported on this Microsoft Q&A platform.

    I would request you to please post your queries in dedicated forums as in below links:

    https://developercommunity.visualstudio.com/spaces/21/index.html

    https://developercommunity.visualstudio.com/t/get-unique-id-from-devops-organization/756710

    https://stackoverflow.com/questions/tagged/azure-devops

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.