mpril
mpril

Reputation: 61

How to create Test result in TFS2015 and add them to summary page

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?

Upvotes: 0

Views: 758

Answers (1)

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51073

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 :


Upvotes: 1

Related Questions