Couldn't find an open issue, if we have one feel free to close this one against it
Note we already use hooks for test discovery, this issue for test execution. The output on executing tests is not stable, so the assumptions we make when scraping output can break things. (For eg. #12403, pytest-dev/pytest#7463, #7265)
API details: pytest-dev/pytest#7463 (comment)
Similar issue for unittest framework: #10119