How to generate test report using pytest?

限于喜欢 提交于 2019-12-21 07:14:05

问题


How can I generate test report using pytest? I searched for it but whatever i got was about coverage report. I tried with this command:

py.test sanity_tests.py --cov=C:\Test\pytest --cov-report=xml

But as parameters represents it generates coverage report not test report. Please help!!


回答1:


Ripped from the comments: you can use the --junitxml argument.

$ py.test sample_tests.py --junitxml=C:\path\to\out_report.xml


来源:https://stackoverflow.com/questions/29123840/how-to-generate-test-report-using-pytest

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!