Cyril
Cyril

Reputation: 563

No code coverage with nosetests, despite option

I want to generate a Cobertura style XML for code coverage of my python package. My command looks like this:

nosetests --verbosity=3 --cover-package=jenkinsqa --nocapture --nologcapture --with-xunit --cover-inclusive --cover-erase --with-xcoverage

Despite the presence of the --with-xcoverage option, no coverage.xml file is created. I tried to add a --with-xcoverage-file=cov.xml and still no output. The xunit results are saved correctly in nosetests.xml, and also a .coverage file. I know I could run after coverage xml to obtain the xml file from the .coverage file but I'd like to know why nosetests isn't doing the export. I'm using nosetests version 1.3.7 with nosexcover 1.0.11.

Upvotes: 0

Views: 646

Answers (1)

stx101
stx101

Reputation: 271

To get the coverage information in xml format you need to add the --cover-xml argument

Upvotes: 2

Related Questions