Adding attachments to allure report via direct addition to junit xml file #2651
Replies: 2 comments
-
The issue with The link you provided refers to a specific dialect of I suggest using the Allure results format for all custom integrations: https://allurereport.org/docs/how-it-works-test-result-file/ Allure supports steps (including nesting), attachments (for tests and steps), parameters, custom metadata, and more. It is simple to use: there is only one required field — the test name (though you will likely need to specify the status as well): {
"name": "A passed test result",
"status": "passed"
} Allure requires creating a separate result file for each test, which is intentional. The results are stored on the file system as soon as a test finishes, making the system more failure-tolerant. Even if the test process fails, you will still have access to the results of the already completed tests. Consequently, you can have real-time reporting (already supported by Allure TestOps and will soon be included in the Allure Report). Additionally, it provides first-class support for distributed test execution. |
Beta Was this translation helpful? Give feedback.
-
Ok thanks, will explore more closely using allures results format. |
Beta Was this translation helpful? Give feedback.
-
Hi, we have a tool written in rust that is currently writing out test results as junit.xml. We then use allure generate on these xml results.
The problem I am having is that I cannot figure out how to add attchements/screenshots via this method. Is this possible to do? We can output in a different common format if needed, but it doesn't seem practical to write out the large amount of allure format json files in lieu of the single file per test suite we currently generate.
I did attempt using the linked convention, where the attachment is a property for the test case, but that didn't work.
https://github.com/testmoapp/junitxml?tab=readme-ov-file#attachments
https://github.com/testmoapp/junitxml?tab=readme-ov-file#conventions-attachments
Is there a good solution for this? Maybe supporting the above convention could be added as a feature?
Beta Was this translation helpful? Give feedback.
All reactions