azure-pipelines-tasks: Publish Test Result: JUnit result with multiple test suites not displayed properly
Hi there,
we’re encountering problems using the “Publish test results” tasks under following environment:
- TFS on-premises: 15.117.27024.0
- Private Agent: 2.122.1 running on Windows 7
The test results file (JUnit) contains multiple testsuite elements, which again can contain multiple test cases. The publishing runs without exception. But the “Tests” overview does not group the results by testsuite. Instead it produces a single “parent node”, which contains all testcases of all testsuites.
<?xml version="1.0" encoding="utf-8"?> <testsuites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <testsuite name="Testsuite1" tests="2" failures="2" errors="0" time="0" timestamp="2018-07-06T14:27:44.3258474+02:00" id="0"> <testcase name="Case1" time="0"> <failure>Fail1</failure> </testcase> <testcase name="Case2" time="0"> <failure>Fail2</failure> </testcase> </testsuite> <testsuite name="Testsuite2" tests="2" failures="2" errors="0" time="0" timestamp="2018-07-06T14:27:44.3258474+02:00" id="1"> <testcase name="Case1" time="0"> <failure>Fail1</failure> </testcase> <testcase name="Case2" time="0"> <failure>Fail2</failure> </testcase> </testsuite> </testsuites>
The image shows the single parent named “Unspecified”. I would expect two test suites (Testsuite1 and Testsuite2).
Greetings
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 23
- Comments: 47 (1 by maintainers)
@dnlopes like you quoted:
That was 3 years ago. So, in this case, people are just starting to question Microsoft’s backlog grooming, I guess. 🤷♂️
Real-world public example: https://www.npmjs.com/package/prettier-plugin-elm
Contents of
junit.xml
:Task:
Result (test suites are joined, total duration is broken):
HALP 🙏
Hi , We have considered this feedback and added this to our backlog. We’ll take it up in the coming months. I’ll post the updates once its done. Thanks.
@divais I still have the same issue. Test suite names are just ignored, only test cases are shown when publishing the test result. Is there any ETA when this will be available?
Any update on this?
We have just moved from an on-premise Jenkins to Azure DevOps just to discover that in this shiny new cloud world we cannot even review test results anymore due to said flattened list of undistinguishable test cases.
This is a crucial feature!
Any news, when this is planned?
Is this going to be supported in the future, or is it on the roadmap?
Some promised to share a workaround, but I couldn’t find anyone, so I wrote one myself. I’m unsure if I will have to wait until the 6th anniversary of this bug to publish it… (just kidding). Here you are!
It depends on xmlstarlet - a command line XML toolkit
Use your own
job.xml
- fetching one from the internet as I do here is just an example.pipeline.yaml
:split_junit_testsuites.sh
:Use at your own risk.
Any updates? Test results UI looks really inconvenient
Yet another person asking for an update on this issue. As said above, this was added to the backlog.
Any update on this? We are using Azure DevOps Services and all test cases gather in a single test run is not usable when we are reviewing the report.
This is a critical one for us as well! So please give us some updates!
Microsoft isn’t interested in building Azure features that are complete. They are only interested in building features enough of the way so that they can claim that Azure supports said feature. So this, like so many other things, will never get fixed.
But it clearly says in your official documentation that you support test suites (e.g., under Test Results > Outcome):
it’s marketing for peopleless computing 😄
it’s on the backlog since 2019. please be patient 😁
Our team would love if this was worked on or we could find a workaround as well. An update would be great
four years… duh.
Could you explain where did you put the -tag, please?
@shailesh-sk could you please take a look?