xcresults: metadata support #3045
Replies: 1 comment
-
Hi, @maxibello! You should use activities, not attachments, to add metadata to test results. The name of the activity must follow the corresponding naming convention.
Activities that follow them will not be converted to steps but will instead apply the metadata. Example: XCTContext.runActivity(named: "allure.id:1001") { _ in }
XCTContext.runActivity(named: "allure.name:My test case") { _ in }
XCTContext.runActivity(named: "allure.description:A description of the test case") { _ in }
XCTContext.runActivity(named: "allure.label.layer:UI") { _ in }
XCTContext.runActivity(named: "allure.link.Discussion 3045[issue]:https://github.com/orgs/allure-framework/discussions/3045") { _ in }
XCTContext.runActivity(named: "allure.link.Homepage:https://allurereport.com") { _ in } You can then set up a mapping between labels and custom fields as described in the TestOps documentation. As for TestOps environments, you should split Allure result files into separate directories (each corresponding to a specific environment) and upload them individually, providing the configured environment variables. The exact way of splitting depends on your case. If the environments are based solely on Xcode run destinations, you may (it it's applicable to your workflow) keep the results of each destination in a separate xcresult bundle without merging them. In that case, export each bundle to its own location. Otherwise, consider post-processing the exported Allure results with a custom script. Tools like |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I have a question about custom metadata support in xcresults export to Allure 2 format.
Context:
XCTAttachment
.allure.label.MyLabel
orallure.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:
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 thelabels
/parameters
sections of the result JSON.Question:
Example of what I tried:
Thank you in advance for any advice or clarification!
Beta Was this translation helpful? Give feedback.
All reactions