Hi @maartene! Thank you for your interest in proposing a GSoC project for swift-testing, we welcome involvement from you or anyone else who is motivated and interested in participating. Those of us who primarily maintain swift-testing have not acted as mentors for a GSoC before, so please bear with us as we navigate this process for the first time and explore what kind of project might make sense.
You put together a nice list of topics, so I'd like to consider each of those individually and offer some thoughts below.
This is a topic a few others have commented on and offered arguments in either direction. I think there are two questions to figure out in this space:
-
Is it technically feasible; and
-
Is it a generally worthwhile and good feature for swift-testing to include.
Re: 1, @grynspan has experimented with implementing this in the past and encountered some technical limitations both in Swift Macros and in the underlying language and compiler. He may be able to reply with more details if it would be helpful, but solving those technical challenges would likely be a prerequisite to the introduction of such a feature in swift-testing.
That doesn't mean it isn't worthwhile to consider this idea for GSoC, though! If these technical blockers could be lifted through improvements to the language or tools (likely through contributions to Swift and related packages like swift-syntax), that might allow swift-testing to eventually adopt this as a feature. As a community, we would still want to discuss question 2 above though (whether it's worthwhile) before committing to this.
To me, this topic seems the most immediately actionable for a GSoC project. @Sajjon put together a compelling prototype of "live progress" console output a while back which is worth looking at for inspiration.
I commented on that draft PR at the time that, in order to realize that idea, we would probably need to implement a bit more infrastructure to have output generated from a supervisory or "harness" process. Some of that work our team has considered beginning soon, in support of our goals around tools integration. So a GSoC project along these lines could be viable, and may involve some combination of:
-
Targeted improvements to the existing output, such as a summary or richer colors;
-
Introducing a supervisory "harness" process, if such a mechanism hasn't been built yet; or
-
Leveraging the harness mechanism to implement live reporting or "watch for failure and rerun" functionality.
Re: item 1, the console output has already been getting regular, incremental improvements so it might not represent a full GSoC project, while the latter two items would be more involved.
Note: swift-testing originally used XCTest to drive execution and reporting, but it no longer requires this when using SwiftPM from recent Swift main snapshot toolchains.
This topic is very interesting, and frequently requested by the community. I would love to see work in this area, but I believe the fundamental limitations which make it difficult are in the language, so it's not clear to me that a GSoC project for swift-testing specifically would be actionable. If anyone thinks there are opportunities for swift-testing improvements in this area though, lets discuss more.
This topic overlaps some with "Nicer test output" above, in that we believe fully realizing this goal may require a supervisory or "harness" process architecture. A project in this space may also involve adding new traits or other APIs to allow users to control this behavior. This is definitely an area where we'd like to improve, and AFAIK it's not blocked by any fundamental langauge or compiler limitations, so I'd consider this pretty actionable, too.
Hope that's helpful, and I look forward to hearing whether any of these responses resonate.