azure-devops-rest-api

How to add/update individual result to each test step in testcase of VSTS/TFS programatically

我们两清 提交于 2019-12-01 09:35:53
问题 I'm able to update test result to testcase in VSTS through program. Test Case Result Updation Now, i want to update the result of each test step in test case. Couldn't find any related info. Please help 回答1: The simple way is using client API: Simple sample: int testpointid = 176; var u = new Uri("https://[account].visualstudio.com"); VssCredentials c = new VssCredentials(new Microsoft.VisualStudio.Services.Common.VssBasicCredential(string.Empty, "[pat]")); TfsTeamProjectCollection _tfs = new

Why I get Internet Explorer enhanced security error message in Chrome if I call VSO API from Angularjs SPA?

我的未来我决定 提交于 2019-12-01 04:11:31
I have a SPA implemented in Angularjs - Typescript calling VSO API and providing authentication data you can find below: ((): void => { "use strict"; angular .module("app") .config(config); config.$inject = [ "$httpProvider" ]; function config( $httpProvider: ng.IHttpProvider ) { $httpProvider.defaults.headers.common['Authorization'] = "Bearer username:password"; } }); I see the Network tab of the browser that this call will be redirected to here: https://app.vssps.visualstudio.com/_signin?realm=dldxdm.visualstudio.com&reply_to... And a following request. The console does not show any

Include code coverage report in VSTS, Is Test Adapter mandatory for VSTS?

限于喜欢 提交于 2019-11-30 12:29:55
I am generating code coverage using Karma-coverage. I can host my output coverage folder on http-server and view it locally. How do I make this report visible on VSTS code coverage tab? Do I need to re-format my coverage result in VSTS compatible? I have read about vsts-tasks, but I have no clue how to achieve the same. Any help is appreciated. Krishh VSTS Code coverage supports the outputted code coverage results in Jacoco or Cobertura formats . Karma-Coverage supports Cobertura format . Edit your karma.config.js for karma-coverage: coverageReporter: { type : 'cobertura', ... } karma-remap

Include code coverage report in VSTS, Is Test Adapter mandatory for VSTS?

不问归期 提交于 2019-11-29 17:51:35
问题 I am generating code coverage using Karma-coverage. I can host my output coverage folder on http-server and view it locally. How do I make this report visible on VSTS code coverage tab? Do I need to re-format my coverage result in VSTS compatible? I have read about vsts-tasks, but I have no clue how to achieve the same. Any help is appreciated. 回答1: VSTS Code coverage supports the outputted code coverage results in Jacoco or Cobertura formats. Karma-Coverage supports Cobertura format. Edit

How to get unit test results using TFS Rest API?

五迷三道 提交于 2019-11-29 08:51:24
How to retrieve the unit test results of a build in TFS using Rest API? The build definition uses VNext (Visual Studio 2015 Update 3). var vssConnection = new VssConnection(_configurationSpec.TeamProjectCollection, new VssClientCredentials()); _buildClient = vssConnection.GetClient<BuildHttpClient>(); The test result of the build is stored in test runs, so you need to get the test run of the build first and then retrieve the test result from the test run. Following is the code sample: class Program { static void Main(string[] args) { string ur = "https://xxxxxxx/"; TfsTeamProjectCollection

Is out there any REST API for TFS 2013 On-Premises installation?

我的未来我决定 提交于 2019-11-28 20:43:32
We use company Team Foundation Server 2013 for source code and task management. Is there a way how can I manipulate work items within backlog over REST API? Our project is accessible via web url: https://tfs.company.com/tfs/ProjectCollection/Project I have found this: https://tfsodata.visualstudio.com/ but this seems to work only for projects within https://visualstudio.com . I would appreciate also some examples. Thanks! Richard Banks Not in any officially supported manner. That said, it doesn't take too much exploring to see that some of the APIs are already present in TFS 2013 already. For

Trigger builds based on TFS workitem information

此生再无相见时 提交于 2019-11-28 10:32:36
问题 I am currently looking for best practices to implement as use case in VSTS Details below 1) Our board has several tfs work items and these work items can have multiple states example : 'Ready for build', 'Ready for deployment' etc 2) Based on the changes made to work item, is it possible to trigger a build ? For example if the workitem is moved to 'Ready for deployment' state, a deployment build should be triggered In other words how can we trigger builds based on changes to a work item ? 回答1

Start a build and passing variables through VSTS Rest API

自闭症网瘾萝莉.ら 提交于 2019-11-28 10:22:53
I would like to start a Visual Studio Team Service build through the REST API. There is an API for queuing builds but I couldn't find a way to define variables. The accepted answer does not really answers the question when you need to set a value at queue time. The solution is actually pretty simple you just have to add a parameters field to the json payload. The content should be a json string (not directly an object) containing the parameters Ex : { "parameters": "{\"ReleaseNumber\": \"1.0.50\", \"AnotherParameter\": \"a value\"}", "definition": { "id": 2 } } EDIT : This feature is now

How to sync repo in bitbucket to Visual studio team service?

萝らか妹 提交于 2019-11-28 09:33:55
I am very new to VSTS platform. In one of my project, I am trying to integrate the bitbucket source control to VSTS. By this way I should be able to see the updates made on bitbucket onto the VSTS account. I have tried creating build on VSTS, but that only shows the commits history of the selected repository of bitbucket. Is there a way to manage all the bitbucket changes on VSTS as source control? To sync changes from bitbucket repo to VSTS git repo automatically, you can achieve it by using a VSTS build definition . Detail steps as below: 1. Create a build definition with Bitbucket repo When

How to get unit test results using TFS Rest API?

爱⌒轻易说出口 提交于 2019-11-28 02:17:44
问题 How to retrieve the unit test results of a build in TFS using Rest API? The build definition uses VNext (Visual Studio 2015 Update 3). var vssConnection = new VssConnection(_configurationSpec.TeamProjectCollection, new VssClientCredentials()); _buildClient = vssConnection.GetClient<BuildHttpClient>(); 回答1: The test result of the build is stored in test runs, so you need to get the test run of the build first and then retrieve the test result from the test run. Following is the code sample: