-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Need a global interceptor that buffers test output (stdout).
The interceptor should:
- Wrap test execution with
ob_start()/ob_get_clean() - Store captured output in
TestResultmetadata - Renderers decide how to display it (e.g., TeamCity shows always, CLI shows only on failure)
- Track
ob_get_level()before and after test. If level changed and test passed — mark as risky (default behavior)
Attribute
#[BufferOutput(enabled: bool)] — controls buffer capture for specific test.
Can be used to:
- Disable capture when globally enabled
- Enable capture when globally disabled
Open questions
how to configure behavior on buffer level mismatch?
Options:
onLevelMismatch: Status::Failed— single param for any changeonLevelIncrease/onLevelDecrease— separate params (increase = buffer leak, decrease = test closed external buffer)nullto ignore
Needs more thought on real use cases.
Metadata
Metadata
Assignees
Labels
No labels