简体   繁体   中英

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

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!

From GitHub pytest-html discussion is not possible to that, this features will be added在此处输入图像描述 in the 4.x version

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM