如何用鼻子测试输出coverage XML? [英] How to output coverage XML with nosetests?

查看:63
本文介绍了如何用鼻子测试输出coverage XML?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试输出我的鼻子测试的coverage XML,以便它们显示在Hudson上.我正在执行的行是:

I'm trying to output the coverage XML of my nosetests so they show up on Hudson. The line I'm executing is:

nosetests --with-gae -v --all-modules --with-xunit --with-coverage

我在控制台中看到了coverage的输出,但是没有包含coverage数据的xml文件.如何获取输出coverage XML的信息?

I see the coverage output in the console, but there's no xml file containing the coverage data. How can I get it to output the coverage xml?

推荐答案

运行nosetests命令后,目录中将存在一个.coverage数据文件.如果随后运行coverage xml,它将从.coverage文件创建与Cobertura兼容的XML文件.

Once you've run the nosetests command, there will be a .coverage data file in the directory. If you then run coverage xml, it will create a Cobertura-compatible XML file from the .coverage file.

这篇关于如何用鼻子测试输出coverage XML?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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