Skip to content

Incorrectly formatted JUnit test results cause the corresponding pipeline page to return a 500

Summary

If the JUnit XML output of a unit test job is formatted incorrectly, the corresponding pipeline page cannot be accessed and returns a 500 error.

Steps to reproduce

  1. Create a new project
  2. Add an incorrectly formatted JUnit XML file e.g. missing >
  3. Create a CI job that returns that XML file as a JUnit test result
  4. Wait for the job to complete
  5. Try to access the pipeline page

Example Project(s)

https://gitlab.com/JUnitParsingResultsIn500/TestProject

Go to the pipelines list and try to open the different pipeline pages.
The first one works.
The second one (after just removing a closing bracket in the XML) returns a 500.
The last one (after fixing the formatting again) works too.

Another one can be found here.

What is the current bug behavior?

The parent pipeline page of a job with an incorrectly formatted JUnit XML cannot be accessed.

What is the expected correct behavior?

The pipeline page can be accessed and maybe the job is marked as failed with helper text about why the failure occurred ("Your output XML may be formatted incorrectly. See http://www.somehelpfulwebsiteaboutthis.com for the proper format.")

Output of checks

This bug happens on GitLab.com

Possibly related to #24792 (closed)

Edited by James Heimbuck