Search code examples
azure-devopsmstest

Viewing Unit Test Descriptions in Azure DevOps Test Results


Is there a way to display the contents of the description attribute on a unit test within the test results page in Azure DevOps Server?

Test Results

To avoid bloating the name of a test we utilize the description attribute (https://learn.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.testtools.unittesting.descriptionattribute?view=mstest-net-1.3.2) in our test code. It would be nice to see this information when viewing the test results after a pipeline executes the tests (using the VSTest task).


Solution

  • As of this time, however, it is not supported to display description attribute on the Tests page.

    As an alternative , you can use the REST API Attachments - Create Test Result Attachment to attach a file which contains description attribute to your test result. Then you can see it in "Attachment" in test result page.