avocado
avocado copied to clipboard
Fix junit output file field: file is empty
Describe the bug Some CIs (like Gitlab) is parsing the xml test report for listing the tests in a table. There we have some fields: "name", "file", "classname" and "file". Currently we are not using the "file" field and using the name for that.
Steps to reproduce Visit the following pipeline result, and check that the filename column is empty:
https://gitlab.com/qemu-project/qemu/-/pipelines/449494631/test_report
Expected behavior Here another pipeline with the file properly set:
https://gitlab.com/beraldoleal/foo-bar-test/-/pipelines/450464128/test_report
Current behavior
https://gitlab.com/qemu-project/qemu/-/pipelines/449494631/test_report
System information (please complete the following information):
- OS: fedora 34
- Avocado version: master branch
- Avocado installation method: pip, rpm, github ? github.
Additional information
The #5616 showed issue with Jenkins after adding 'file' attribute to JUnit results. Because of this issue, we had to revert #5547 in #5617. Therefore, we have to find another solution. One possibility would be to add a config value which adds 'file' attribute only when it's enabled by user.