I'm using Swift Testing for a small project. According to the docs I can rename a test function or suite by passing a string to @Test and @Suite attributes. I can see these names used on the command line output, but the generated xml (with --xunit-output foo.xml) does not reflect these names. Is this a bug or a currently unsupported feature?

1 Like

The format of XML output is intended to match XCTest's. In particular, programmatic test names are used. This is not a bug. Parity with XCTest's XML output is our goal for the Swift 6 release.

We are in the process of building a more flexible, JSON-based output mechanism that includes, among other data, the display names for tests. For more information about that feature, see [SWT-0002] A stable JSON-based ABI for tools integration by grynspan · Pull Request #479 · apple/swift-testing · GitHub

2 Likes

Ah. I understand now. The new JSON api looks great. Thank you!

1 Like