Skip to content

Swift Testing run summary not captured — "in N suites" segment breaks the run-completion regex #511

Description

@mickeyl

What's the uncaptured output?

Swift Testing's final run-summary line is no longer captured. Recent Swift toolchains emit a in <N> suites segment that the current regex does not allow, so the whole tally is silently dropped:

􁁛  Test run with 76 tests in 17 suites passed after 0.020 seconds.

The only summary that survives is the unrelated (and misleading) empty XCTest bundle line:

Test Suite 'All tests' passed at 2026-06-25 12:06:30.599.
	 Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.001) seconds

For a package that uses Swift Testing exclusively, the rendered output therefore reports Executed 0 tests and never shows the real 76 tests passed tally.

Suggested Regex

SwiftTestingRunCompletionCaptureGroup (CaptureGroups.swift:1961):

^[^ ] +Test run with (\d+) test(?:s)?(?: in \d+ suites?)? passed after ([\d.]+) seconds\.$

SwiftTestingRunFailedCaptureGroup (CaptureGroups.swift:1982) — the failure line carries the same in <N> suites segment and needs the matching change:

^[^ ] +Test run with (\d+) test(?:s)?(?: in \d+ suites?)? failed after ([\d.]+) seconds with (\d+) issue[s]?\.$

The (?: in \d+ suites?)? group is optional so both the older (Test run with N tests passed) and current (Test run with N tests in M suites passed) formats keep matching.

Suggested Output

Test run with 76 tests in 17 suites passed after 0.020 seconds

Additional Context

  • Reproduced with swift test 2>&1 | xcbeautify -qq on a Swift Testing–only package.
  • xcbeautify 3.2.1 (latest release); the same regex is still present on main at the time of filing.
  • Both the passing and failing capture groups are affected; the per-suite (Suite X passed) lines and Test run started. are captured correctly — only the final run-completion summary is lost.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions