<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:bookman old style,new york,times,serif;font-size:12pt"><div>I installed the most recent coverage.py on Windows Vista x64 with Hudson 1.325.&nbsp; It ran the coverage report and parse the output with the Cobertura plugin.&nbsp; My tests are quite simple (mostly tiny little unit tests, testing simple code on the other side as well).<br><br>I was already using nosetests for test discovery.&nbsp; That required a few changes to make it work (either inside or outside Hudson).<br><br>Before coverage, I ran the tests with the command:<br><br>&nbsp;&nbsp;&nbsp; nosetests --with-xunit<br><br>After installing coverage, I ran the same tests with the command:<br><br>&nbsp;&nbsp;&nbsp; coverage run c:\Python26\Scripts\nosetests-script.py<br>&nbsp;&nbsp;&nbsp; coverage xml<br><br>With those commands, I'm able to see percentage coverage results.&nbsp; Unfortunately,
 the Cobertura plugin will not show me the source of the files.&nbsp; In the coverage.xml file, the file name is listed as "test_add_atom.py", while the full path to the source file is "tests\libpdm\test_add_atom.py".&nbsp; I have a suspicion that there is a way to tell the Cobertura plugin where to find my source files, but since this was the first time I'd ever used the Cobertura plugin for Hudson, I was glad to see it work at all.<br><br>Since I already have a script that performs repairs in nosetest.xml (the --with-xunit output file), I think I can easily extend that script to perform repairs in the coverage.xml file.<br><br>Thanks for a great tool!<br>Mark Waite<br></div><div style="font-family: bookman old style,new york,times,serif; font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Ned Batchelder
 &lt;ned@nedbatchelder.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> Sebastien Douche &lt;sdouche@gmail.com&gt;<br><b><span style="font-weight: bold;">Cc:</span></b> tip &lt;testing-in-python@lists.idyll.org&gt;<br><b><span style="font-weight: bold;">Sent:</span></b> Monday, September 28, 2009 7:13:01 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [TIP] Coverage.py 3.1 beta 1: Python 3.x and Cobertura output<br></font><br>


  
  <title></title>

Sebastien Douche wrote:
<blockquote type="cite">
  <pre>On Sun, Sep 27, 2009 at 17:37, Ned Batchelder <a rel="nofollow" class="moz-txt-link-rfc2396E" ymailto="mailto:ned@nedbatchelder.com" target="_blank" href="mailto:ned@nedbatchelder.com">&lt;ned@nedbatchelder.com&gt;</a> wrote:<br><br>Hi Ned,<br><br>  </pre>
  <blockquote type="cite">
    <pre>I'm especially interested in finding people using Hudson or Sonar with<br>Python,<br>    </pre>
  </blockquote>
  <pre>Is it possible to use Sonar with Python? As far I know, It's a "<br>graphical frontend" for misc Java tools (code coverage, cc...). Btw,<br>I'm also interested :).<br>  </pre>
</blockquote>
Honestly, I don't know.&nbsp; That's my difficulty here: Cobertura is
integrated into a few Java toolsets, which I have no experience with,
and even trying to follow the tutorials takes me into unfamiliar
territory.&nbsp; Hudson and Sonar seem to be two that are popular.&nbsp; I'm
hoping this list has some knowledgeable practitioners who can help a
poor n00b like me...<br>
<br>
--Ned.<br>
<a rel="nofollow" class="moz-txt-link-freetext" target="_blank" href="http://nedbatchelder.com">http://nedbatchelder.com</a><br>
</div></div></div></body></html>