-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
What's the problem this feature will solve?
It does not seem to be possible to capture all output including subprocesses in JUnit report while being able to judge the progress of test execution by the output passed through to the terminal.
--capture=fd does the former, but not the latter. --capture=no does the latter, but not the former. --capture=tee-sys does the pass-through, but fails to capture subprocess output, which will only be available in the terminal without the structure of JUnit report.
Describe the solution you'd like
It would be nice to have tee-fd capture mode and, perhaps, an accompanying capteefd fixture. They would capture at file descriptor level like fd/capfd, but would also pass-through test output like tee-fd/capteefd.
This would be best of both worlds - all output of tests including subprocesses would be captured and stored in JUnit report while pass-through output would allow to monitor progress.
Alternative Solutions
Not sure this can be worked around using a plugin since capturing is a core feature.
Additional context
We are using pytest to run high level end-to-end tests of non-Python code. This involves launching subprocesses and the output of subprocesses is crucial for failure analysis. Tests are long-running and if there is no output it is difficult to judge whether everything progresses as usual or the test simply hanged. Tests produce a lot of output, so we use JUnit reports to add some structure.