开发者

How to output coverage XML with nosetests?

开发者 https://www.devze.com 2023-02-05 16:34 出处:网络
I\'m trying to output the coverage XML of my nosetes开发者_StackOverflow中文版ts so they show up on Hudson.The line I\'m executing is:

I'm trying to output the coverage XML of my nosetes开发者_StackOverflow中文版ts so they show up on Hudson. The line I'm executing is:

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

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?


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.


There is a plugin written for nosetests to do just this.

You just have to add --with-xcoverage once this package is installed. It can be found at:

https://github.com/cmheisel/nose-xcover

0

精彩评论

暂无评论...
验证码 换一张
取 消