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.
>
it to a file? – Monkhoodpy.test
, it's generated bycoverage
via thepytest-cov
plugin. As far as I know, there isn't similar functionality built intopy.test
itself. I don't know what Allure is, but this plugin refers to XML reporting: pypi.python.org/pypi/pytest-allure-adaptor – Monkhoodpy.test sample_tests.py --junitxml=C:\path
but it's throwing errorPermissionError: [Errno 13] Permission denied: 'C:\\path'
– CholentPermission denied
– Cholent--junitxml=c:\path\reports.xml
. – Hopeh--junithtml
but it's not valid parameter. – Cholent