Swift Testing

A guide for generating JUnit test reports for Swift Test

1. Generate JUnit

Add the --xunit-output argument to your Swift test command:

swift test --xunit-output junit.xml

2. Output Location

The test results JUnit report will be written to the location specified by the --xunit-output argument. In the example above, it would be at ./junit.xml.

Next Step

JUnit files generated with Swift Test are compatible with Trunk Flaky Tests. See CI Providers for a guide on how to upload test results to Trunk.

Last updated