TFS 2015 On Premise REST API 404 searching test runs or results

user3340931

Using the TFS 2015 REST API to try to get test runs and results with 404. When fetching projects or teams it works fine.

var uri = $"http://tfsserver:8080/tfs/project/_apis/test/runs/1994/results"; 

using (WebClient wc = new WebClient())
{
    wc.UseDefaultCredentials = true;
    wc.Credentials = CredentialCache.DefaultCredentials;
    var result = wc.DownloadString(uri);
    Console.WriteLine(result);
}
Console.Read();

The following URLs do not work: (NOTE: I removed the server portion because of a limitation of stackoverflow)

.../tfs/project/_apis/test/runs

But these do work:

.../tfs/project/_apis/projects/CodedUi/teams .../tfs/project/_apis/projects

PatrickLu-MSFT

You are using the wrong url, lack of team project collection name.

http://tfsserver:8080/tfs/Yourcollection/project/_apis/test/runs/1994/results?api-version=1.0

And since there are two versions of API 1.0,3.0, suggest you also add the related API version. More details please refer this tutorial: Get a list of test results

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to add test results in Azure DevOps through REST API java?

How to trigger a build in TFS 2015 using REST API

How to get PAT from on-premise TFS2015

TFS 2015 Build: Test results not being published

Is there a .NET API equivalent to the "Build 2.0" REST API for TFS 2015?

TFS 2015 REST API Authentication

Queue Build in TFS 2015 REST API with PowerShell

TFS 2015: adding test steps to test case

Publishing test results to TFS 2018 test cases via REST API

How to Move/Rename a file in TFS Source Control 2015, using the REST API?

How to enable users to edit HtmlFieldControl source in TFS 2015 on-premise?

How to get test cases from TFS project using TFS rest api version 3.2

How to test if my application method handles HTTP status 404 of a REST API without actually calling that REST API

Add Test Results with references to Test Plan, Test Suite, Test Case not working "ShallowReference" using azure rest api

TFS Build 2015 not publishing test results

How to create a new Team inside team project using Rest API in TFS 2015

TFS Build 2015 No results found to publish

Add/Remove users in TFS 2015 using REST API powershell

CasperJS Test Results in TFS / VSTS

TFS 2015 query to retrieve Test Plan results

Is the Sabre Advanced Calendar REST test api limited in its results?

TFS 2015 Build / Release - View History Test Results for Automated Test Cases

Build .net standard 1.4 class library TFS 2015 on premise

TFS Rest API: parameter outcomes to filter test results is not working

Creating a test case in tfs 2015 by rest api version 2.2

TFS On Premise: API to Create Backlog Item using Postman

How to retrieve Test Results in Azure DevOps with Python REST API?

Get test result/run attachments using TFS REST API

Unable to import test results to jira via rest api