pytest-html
pytest-html copied to clipboard
Output the stdout in the use case to the console and html report at the same time
I‘m useing pytest-html and find the plugin generally fantastic. But I have been in contact with pytest-html for a short time. During the use, I found that adding the'-s' parameter to the pytest command can display the standard output of the use case to the console, but the standard output of the html report cannot be captured. With the'--capture=sys' parameter, the html report is captured, but the standard output in the console disappears. Is there any way to display it in the console and html report at the same time?
with pytest-html3.x.x -s --capture=sysgive you all. if you pytest-html 2.1.1 you can finegrain the various combinations
We really miss ways to finegrain output. --capture=fd and tuning the logging so it only output a stderr files, no stdout file is my current workaround. But it is not sustainable because I like logging and output to be exactly like in production. (We often search for errors in test system if we see them in prod)