Cannot upload screenshot in JUnit reporter
I’m trying to upload screenshot on CI pipeline test job run.
According to the article: https://docs.gitlab.com/ee/ci/junit_test_reports.html#viewing-junit-screenshots-on-gitlab
If JUnit XML files contain an
attachmenttag, GitLab parses the attachment.
I can get test results in merge-request and in pipeline view, by using
artifacts:reports:junit in my ci yaml config.
However, if add ATTACHMENT with absolute file path to my xml test report, nothing will happen.
- Both gitlab features “:junit_pipeline_view” and “:junit_pipeline_screenshots_view” are enabled.
- GitLab Enterprise Edition 13.1.1-ee
- .NET tech stack, tests are written on C# + SeleniumWebDriver
- Tests are running in docker image
- There is a remark
When this issue is complete, the attached file will be > visible on the pipeline details page
How does upload screenshot on job run work then?
- How is it supposed to be used? Should I manually edit testresult.xml at runtime and write filepaths to screenshots, or there is a program way to do that?
Thank you in advance