Share via

Displaying Tags from JUnit XML in Azure DevOps Test Results

Martin Bečka 25 Reputation points
2025-08-28T14:46:42.6733333+00:00

Hello,I am using the PublishTestResults@2 task during testing in Azure DevOps with a JUnit .xml file. I would like to make Tags visible in the Test Results web tab.

I have tried adding a <property name="Tags" value="..."/> element under <testcase><properties>, but the tags are not appearing in the UI.

Is there any supported way to make Tags from a JUnit XML visible in the web test results tab?

Thank you.

Best regards, Martin

obrazek

Azure DevOps
0 comments No comments

Answer accepted by question author

Anurag Rohikar 3,190 Reputation points Microsoft External Staff Moderator
2025-09-02T09:47:26.9066667+00:00

Hello Martin, Thanks for reaching out on Microsoft Q&A!

Currently, the PublishTestResults@2 task in Azure DevOps only parses a limited subset of the JUnit XML schema. While elements such as test case name, class name, duration, error/failure messages, and stack traces are supported, custom metadata like <properties> or <property name="Tags" … /> are not displayed in the Test Results web tab.

That’s why the tags you’ve added under <testcase><properties> are not appearing in the UI. Since this feature isn't supported out-of-the-box, the most effective approach is to use a workaround.

Workarounds

  1. Embed tags in test names
    Include tags directly in the test case name so they show up in the results grid:
       <testcase classname="LoginTests" name="[Smoke][UI] should login with valid user" time="0.12"/>
    
    Documentation: Publish Test Results task
  2. Use TRX format (if applicable)
    If your framework supports TRX (for example with MSTest or VSTest), you’ll get richer integration with Azure DevOps Test Explorer, and you can map categories more easily.
  3. Azure Test Plans
    If you need filterable/searchable tags in the Azure DevOps portal, the supported approach is to manage your test cases within Azure Test Plans, where tags and custom fields are first-class citizens.
    Documentation: Manage Test Cases
  4. Custom reporting
    For advanced test reporting needs, consider integrating with tools like Allure or ReportPortal and publishing a link in your pipeline summary. This way you can expose tags and other metadata outside of the default Azure DevOps test tab.
    Documentation: Integrating Allure with Azure Pipelines
    Disclaimer: This document is not maintained by Microsoft. It is being shared solely for your convenience.

At this time there’s no supported way to surface JUnit <properties>/tags in the Azure DevOps Test Results web tab. The recommended workaround is embedding them in test names or using Test Plans for richer test management.

Hope the above helps! Let us know if you have any further question. Thank you!

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.