Cannot upload screenshot in JUnit reporter
Hi everyone,
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
attachment
tag, 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.
Configuration:
- 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
My questions:
- 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