Junit tests not being parsed

Issue #17369 open
Adam Barnwell
created an issue


I'm using TSLint to generate a Junit XML file to be reported on by Pipelines.

However, when I run my builds and the XML I've attached to this ticket gets generated in a folder called 'test-reports', I get the following messaging from Pipelines:

Searching for test report files in directories named [test-results, failsafe-reports, test-reports, surefire-reports] down to a depth of 4 Found matching test report file /opt/atlassian/pipelines/agent/build/test-reports/lint.xml Located test suite containing 0 tests, with 0 failures and 0 errors. Located test suite containing 0 tests, with 0 failures and 0 errors. Finished scanning for test reports. Found 1 test report files. Merged test suites, total number tests is 0, with 0 failures and 0 errors.

Pipelines appears to be locating the file correctly and it's even managed to determine that there are two test suites. However, it doesn't appear to have noticed that there are some tests in these suites and some of them are failing (as per the XML).

The only difference I've found between this Junit XML output by TSLint and that of something like a Jest JUnit output is that this is missing some attributes (such as success/failure). However, I would have thought that Pipelines would have been able to infer these figures from the hierarchy?

Comments (4)

  1. Graham Gatus staff

    @Adam Barnwell, what TSLint library are you using to generate these results? I can see from the report that each <testsuite> is missing count, failure and error attributes, which we currently use in parsing of test results. If count is empty or 0, we don't parse the tests within the testsuite. Whether this is a bug in our test parsing, or a bug with the TSLint lib tooling is still to be determined. Potentially, we could infer these counts based on the contents of the test report file to be more robust against xml reports that don't include these totals.

  2. Log in to comment