Is any possible for the report in pytest-html to be generate only when 1 test is fail?

545 views Asked by At

I got some tests to be executed and I want the report to be generated only if 1 of the tests are fail, right now I use this command:

pytest -v -s --html=report.html --self-contained-html --capture=tee-sys  -rx --verbose --maxfail=6  testCases/test_signup_0.py

but this command generates a report for passing tests too.

I tried to add --lf(list fails) but this command test only the fails tests.

Thank you in advance!

1

There are 1 answers

1
Georgian Costea On BEST ANSWER

From GitHub pytest-html discussion is not possible to that, this features will be addedenter image description here in the 4.x version

GitHub discussion