Skip to content

Fix bugs/edge cases of JUnitParser

Shinya Maeda requested to merge fix-junit-parser into master

What does this MR do?

We shipped the feature - JUnit test report in 11.3. https://docs.gitlab.com/ee/ci/junit_test_reports.html describes how it works.

After we got feedback from users in https://gitlab.com/gitlab-org/gitlab-ce/issues/50426, we realized that there are two edge cases that JUnitParser failed to parse unreasonably.

Here are the edge cases.

  • There are no <testcase>s in a <testsuite>
  • There is only one <testsuite> in a <testsuites>

This MR resolves the both cases by cleaning up functions in the parser.

What are the relevant issue numbers?

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/50960 https://gitlab.com/gitlab-org/gitlab-ce/issues/50959

Does this MR meet the acceptance criteria?

Edited by Shinya Maeda

Merge request reports