I found this issue while running a test case in pytest framework in which once the test completes (either pass or fails) On report.html I am getting "No Log Output Captured" when i click on show details on each test cases.
report.html
command I use to get html report: pytest test_01.py -s -v --html=report.html
In console I am able to get the print statement. however is there any possible ways that I can get the same in report.html as well?
console output:
collected 1 item
------------------------ Test 1 Initiated: Verify LogRetention file count in dropbox ------------------------
Device rebooting...
------------------------ Test 1 PASSED successfully : Verify LogRetention file count in dropbox folder ------------------------
Test case took 118.19 seconds.
test_01.py::test_verify_file_count ✓
you have to use logger instead of print
You can also use
--capture=tee-systo see both stdout and log outputI hope it helps