while running a test, I want to save all the terminal live logs into log or txt file like below,
Expected output:
================================================================== test session starts ===================================================================
platform win32 — Python 3.9.9, pytest-8.2.2, pluggy-1.5.0
rootdir: C:……….PycharmProjectsPytestProject1
configfile: pytest.ini
plugins: html-4.1.1, metadata-3.1.1, sugar-1.0.0, tap-3.4
collected 1 item
test_demo1.py
.
[100%]
=================================================================== 1 passed in 0.04s ====================================================================
is it fine if we can use any python plugin.
Jaymin Modi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.