-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Hello!
Context:
- I am running iOS UI tests with XCTest and generating attachments in each test using
XCTAttachment. - I use names like
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:
- 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.jsonfiles - Reads their content and adds corresponding entries to the
labelsandparameterssections - 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 tolabelssectionallure.environment.*→ add toenvironmentorparameterssectionallure.parameter.*→ add toparameterssection
Thank you in advance for any advice or clarification!
Metadata
Metadata
Assignees
Labels
No labels