Py.Test:报告和 HTML 输出 [英] Py.Test : Reporting and HTML output

查看:43
本文介绍了Py.Test:报告和 HTML 输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这根本不是技术问题.但是,我找不到应该使用以下方法生成的 .HTML 报告:

This is not a technical question at all really. However, I can not locate my .HTML report that is supposed to be generated using:

py.test --cov-report html pytest/01_smoke.py

py.test --cov-report html pytest/01_smoke.py

我认为它肯定会将它放在父位置或测试脚本位置.两者都没有,我一直无法找到.所以我认为它根本没有被生成?

I thought for sure it would place it in the parent location, or the test script location. Does neither and I have not been able to locate. So I am thinking it is not being generated at all?

推荐答案

我认为您还需要指定要覆盖的目录/文件,例如 py.test --cov=MYPKG --cov-report=html 之后生成 html/index.html.

I think you also need to specify the directory/file you want coverage for like py.test --cov=MYPKG --cov-report=html after which a html/index.html is generated.

这篇关于Py.Test:报告和 HTML 输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆