0

I need to see my test's result in the summary page. The test report in custome format, so I can't use 'in-box' testing task of TFS, but I would like to have the same behaviour as for Unit tests:

  1. statistic in summary page with link leading to Test details tab
  2. Tab with tests details in build summary
  3. TestRun in 'Test->Run' category (optional)
  4. Detail information for each test.

I found how to make it in 'Test->Run' with this link How to create a test run and result using the Team Foundation Server API? (many thanks to author). In this solution Test created base on Test Plan and Test Suite. According to my experience, the Unit test creates Test Run base on Build, and I belive that should be TFS API to do it programmatically.

Could someone suggest me where such API could be found. And if p1 and p2 possible to make and how?

Community
  • 1
  • 1
mpril
  • 51
  • 4

1 Answers1

1

For your requirement, you may have to create a section or a tab by writing your own vsts extension to display the info in build result report and build summary.

You can upload the xml result file as 'testrun-attachment' via REST-interface and got the pieces in place to show the summary values on the build summary tab or on your own extended “test result” tab. Here is a example with how to display opencover result for your reference: vsts-opencover, finally will get the result as below:

enter image description here

How to write your own extension:

Overview of extensions for Visual Studio Team Services

Some examples :


PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • It was my previous attempt. The thing is that this tab will appear for all projects and builds, but I would like to have it only for builds with my Task. I've already asked how to do it in [link]http://stackoverflow.com/questions/39729392/vsts-build-summary-tab-with-visible-condition-or-task-dependency?noredirect=1#comment66828329_39729392. – mpril Oct 27 '16 at 13:07
  • I really have a filling that IBuildService could somehow creates ITestResult. Or at least there is a way to connect Build with existing Test Run (assume that I can create fake Test Plan and create new Test Run for it and then connect Test Run with Build). – mpril Oct 27 '16 at 13:12