Hello!
Context:
- I am running iOS UI tests with XCTest and generating attachments in each test using
XCTAttachment.
- I use names like
allure.label.MyLabel or allure.environment.os for these attachments, hoping they will be mapped to Allure labels or environment fields in the resulting *-result.json files.
What I see:
- After running
xcresults export ..., all my attachments appear in the "attachments" section of the test in Allure, but they do not appear as labels or environment fields in the Allure report or in the labels/parameters sections of the result JSON.
Question:
Is there a way to make xcresults map certain attachments (by name or type) to Allure labels or environment fields automatically? If not, are there any plans to support this feature in the future? Is there a recommended workaround for adding per-test custom fields and environment variables to Allure results for iOS/XCTest?
Example of what I tried:
let automationAttachment = XCTAttachment(string: "true")
automationAttachment.name = "allure.label.iOSAutomation"
add(automationAttachment)
let osAttachment = XCTAttachment(string: "iOS 18.5.0")
osAttachment.name = "allure.environment.os"
add(osAttachment)
Current workaround:
I'm currently using a post-processing script that:
- Finds attachments with specific names in the generated
*-result.json files
- Reads their content and adds corresponding entries to the
labels and parameters sections
- This works but requires additional processing step
Feature request:
It would be great if xcresults could automatically recognize attachments with names like:
allure.label.* → add to labels section
allure.environment.* → add to environment or parameters section
allure.parameter.* → add to parameters section
Thank you in advance for any advice or clarification!
Hello!
Context:
XCTAttachment.allure.label.MyLabelorallure.environment.osfor these attachments, hoping they will be mapped to Allure labels or environment fields in the resulting*-result.jsonfiles.What I see:
xcresults export ..., all my attachments appear in the "attachments" section of the test in Allure, but they do not appear as labels or environment fields in the Allure report or in the labels/parameters sections of the result JSON.Question:
Is there a way to make xcresults map certain attachments (by name or type) to Allure labels or environment fields automatically? If not, are there any plans to support this feature in the future? Is there a recommended workaround for adding per-test custom fields and environment variables to Allure results for iOS/XCTest?
Example of what I tried:
Current workaround:
I'm currently using a post-processing script that:
*-result.jsonfileslabelsandparameterssectionsFeature request:
It would be great if xcresults could automatically recognize attachments with names like:
allure.label.*→ add tolabelssectionallure.environment.*→ add toenvironmentorparameterssectionallure.parameter.*→ add toparameterssectionThank you in advance for any advice or clarification!