Open ypopovych opened 5 months ago
Seems as library has Event
API already. API to register event handlers should be added (maybe as dynamic library through command-line arguments) or through some macros in code.
I agree this is something we want to expose as public API eventually.
Tracked internally as rdar://129609023
We have a lot of the moving parts already. What we don't have is a way to hook into the event stream arbitrarily.
Currently, there is support for streaming JSON descriptions of events to an arbitrary file when using swift test
. Xcode doesn't offer a way to enable that functionality, but it could be done.
Would that be sufficient for your use case?
Experimental implementation on branch jgrynspan/469-observer-attribute.
Description
It will be good to have a way to observe testing process. Analog to the
XCTestObservation
andXCTestObservationCenter
in the XCTestExpected behavior
No response
Actual behavior
No response
Steps to reproduce
No response
swift-testing version/commit hash
No response
Swift & OS version (output of
swift --version && uname -a
)No response