Hive Hive
Sign in

Document how to use xcresultparser with Tuist to export test results as .junit or any other format.

GitHub issue · Open

Metadata
Source
tuist/tuist #6749
Updated
Jun 11, 2026
Domains
CLI
Details

What problem or need do you have?

Some users reported that it’d be helpful to export the test results in .junit format.

Potential solution

There’s a CLI, xcresultparser, that does that, so I think instead of integrating it into Tuist, I suggest that we document how to:

  • Add it as a dependency of the project using Mise
  • Use the right flag with tuist test to export the .xcresult in a particular directory
  • Then run xcresultparser to turn that into the preferred format
Comments
S
stefanomondino Jun 20, 2025

For those who might a solution to this, I was able to replace my previous workflow with Fastlane scan with

tuist test --result-bundle-path tests.xcresult
xcresultparser -o junit tests.xcresult > results.junit
xcresultparser -o cobertura tests.xcresult > coverage.xml

Options can be changed according to appropriate needs (I needed Cobertura for code coverage reports and JUnit for unit tests) After generating those file I was able to upload them back to Azure Devops and see them associated to the current opened PR.

P
pepicrft Jun 20, 2025

Thanks @stefanomondino for sharing the resulting setup. I think peeling abstractions at the automation layer is a good idea bringing you down to the raw tools where you have full flexibility. It takes a bit of extra code, but it’s worth it.

S
stefanomondino Jun 20, 2025

Just wanted to point out for future references that using Cobertura (for code coverage) or any other data regarding code coverage might be pointless when using selective testing, because you only get a coverage “snapshot” on the tests that where executed on that specific run, and hopefully it’s only a small part of them. It’s already written as a warning box in Tuist documentation pages, but if people land on this issue via Google like I did it’s best to re-state it :)

@pepicrft are you planning to also integrate tests results (with details) on the Cloud console?

F
fortmarek Jun 20, 2025

are you planning to also integrate tests results (with details) on the Cloud console?

Yes, we’ll focus on that in the following weeks 🙂