Fix bugs/edge cases of JUnitParser
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?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides
Edited by Shinya Maeda