[Question] How to set up junit correctly in gitlab?
See original GitHub issueHey! We use 3 reporters configured like this.
// playwright.config.ts
reporter: [
['line'],
['junit', { outputFile: 'test-results/junit.xml' }],
['html', { outputFolder: 'public', open: CI ? 'never' : 'always' }],
],
and
# .gitlab-ci.yml
artifacts:
when: always
reports:
junit: test-results/junit.xml
paths:
- public
- test-results
The HTML reporter works great. I see screenshots in the report. But I don’t understand how to set up junit correctly, there are no screenshots in his report in the gitlab interface. I would be very grateful for help
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Unit test reports - GitLab Docs
To enable the Unit test reports in merge requests, you must add artifacts:reports:junit in .gitlab-ci.yml , and specify the paths of the generated...
Read more >Unit test report examples - GitLab Docs
Unit test reports can be generated for many languages and packages. Use these examples as guidelines for configuring your pipeline to generate unit...
Read more >Testing best practices - GitLab Docs
Test performance is important to maintaining quality and velocity, and has a direct impact on CI build times and thus fixed costs. We...
Read more >Test Cases - GitLab Docs
Create a test case · Go to CI/CD > Test Cases. · Select the New test case button. You are taken to the...
Read more >JUnit report is not showing my tests (#223132) - GitLab.org
Run a merge request pipeline with it configured to output a junit test report and be sure that you set artifacts.reports.junit to the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’m facing this problem also. Is there any solution?
Looks like there are two issues.
I have made a test repo and it is working for failed case, https://gitlab.com/Yexiaoxing/playwright-test/-/pipelines/500045223/test_report