Shubham
Shubham

Reputation: 1

Retrieve Test settings using Rest API from TFS

How can i retrieve Test settings using Rest API from TFS.

The below mentioned URL is the best i can get . but this is for Test result retention setting...... and what i am looking for is regular/ general Test settings.

Can some one please provide a sample URL for it.

Sample URL:- https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/Fabrikam/_apis/test/resultretentionsettings?api-version=2.0-preview"

Upvotes: 0

Views: 374

Answers (2)

Andy Li-MSFT
Andy Li-MSFT

Reputation: 30442

If you mean the test settings file (See Specifying Test Settings for Visual Studio Tests), then you can get and open the file from web portal to check the settings.

If you mean Test configurations, you can refer to this link for the REST API : Test configurations:

e.g.: To Get a test configuration:

GET https://{instance}/DefaultCollection/{project}/_apis/test/configurations/{configurationId}?api-version={version}

Whatever, all the available test REST APIs are all here: Test Management


UPDATE:

According to your clarification (below answer), you just want to get the specific test run details. You can use below REST API to Get a test run:

GET http://{instance}/DefaultCollection/{project}/_apis/test/runs/{run ID}?api-version={version}

Then you will see all the settings/properties of the specific test run.

Upvotes: 1

Shubham
Shubham

Reputation: 1

No what I really meant for was the "Test Settings" information. In MTM, we can specify the TestSettngs via TestSettings Manager.( See the below image.)

While creating a test run, we need to provide this "Test Settings" information.

Next, coming to REST API, we can create a test run using REST API too.

The below is the API reference url.

https://www.visualstudio.com/en-us/docs/integrate/api/test/overview

Under "Create a Test Run" section, you can see "test settings" under the content type. I wanted to know how to get that information via REST call(

Check see image 2 below)

(I am unable to embed pictures on the site as i have not earned 10 reputation points. please open the links provided below to view the images)

Upvotes: 0

Related Questions