Feature request: Indented output in the console for tests within a suite #298
Labels
enhancement
New feature or request
swiftpm-integration
Swift Package Manager integration
tools integration
Integration of swift-testing into tools/IDEs
Description
Currently the output to the console is flat:
For example, the below console output...
This can be difficult to read both at a glance and with some time invested, especially when Suites are nested within other Suites.
Proposal
It would be nice if we could indent the tests/suites to a hierarchy like the below structure:
Benefits
The above output is easier to read at a glance and to see what tests and suites are a part of their parent - simplifying readability and seeing at a glance where a test might live to go and debug and ultimately fix it.
Potential issues
All the indenting
This could of course get a bit crazy if you have many nested Suites where the indentation could be so long that it becomes unreadable so we could either:
Parallelised tests
As pointed out by @stmontgomery here #296 (comment) in my original post #296, this could work badly with parallelised tests where the output is non-linear and indentation would cause the tests to be indented under a parent that it's not a part of, eg a parallelised test could appear under a suite it's not a part of because it just happened to run at the same time as the other test in the other suite.
However, this could be remedied simply by the parents being printed on the line above in the console if it hasn't already to make it explicit where the test came from.
Expected behavior
No response
Actual behavior
No response
Steps to reproduce
No response
swift-testing version/commit hash
0.6.0
Swift & OS version (output of
swift --version && uname -a
)swift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Target: arm64-apple-macosx14.0
Darwin AT-ALK6L5VQ 23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000 arm64
The text was updated successfully, but these errors were encountered: