You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GitLab CI/CD pipelines allow uploading a JUnit formatted XML file as a test report, and they have a UI that displays the results. One column of this UI is populated by the "file" attribute on each "testcase" element in JUnit xml report. The vitest junit reporter is not currently populating this attribute, so this data is empty in GitLab when using vitest and the default junit reporter.
Suggested solution
Add the "file" attribute with the filename to testcase elements in the Junit XML report output
Interesting. Actually the first PR from 2 years ago has screenshots with "Filename" blank #534
Looking at jest-junit's issue jest-community/jest-junit#198, it looks like file is not on par with some spec and they have opt-in addFileAttribute flag, so we can probably do the same.
Clear and concise description of the problem
GitLab CI/CD pipelines allow uploading a JUnit formatted XML file as a test report, and they have a UI that displays the results. One column of this UI is populated by the "file" attribute on each "testcase" element in JUnit xml report. The vitest junit reporter is not currently populating this attribute, so this data is empty in GitLab when using vitest and the default junit reporter.
Suggested solution
Add the "file" attribute with the filename to testcase elements in the Junit XML report output
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: