<br><br><div class="gmail_quote">On Wed, Feb 16, 2011 at 1:24 PM, Alfredo Deza <span dir="ltr">&lt;<a href="mailto:alfredodeza@gmail.com">alfredodeza@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br><br><div class="gmail_quote"><div class="im">On Wed, Feb 16, 2011 at 12:39 PM, holger krekel <span dir="ltr">&lt;<a href="mailto:holger@merlinux.eu" target="_blank">holger@merlinux.eu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>On Wed, Feb 16, 2011 at 10:14 -0700, Chris Rose wrote:<br>
&gt; I&#39;d like to try out py.test; I&#39;ve found that it&#39;s nicer output-wise than nose in a lot of respects. However, we have a significant in-house investment in Hudson/Jenkins automated testing that currently depends on nose + xcoverage + xunit output to tie into the Hudson xUnit/Cobertura plugin support for tracking test coverage and successes.<br>



&gt;<br>
&gt; Is there a clear process for tying these things together? I see the --junitxml output flag, so that&#39;s part of the issue solved, but it doesn&#39;t handle coverage.<br>
<br></div></blockquote></div><div>This is how I call py.test in Jenkins:</div><div><br></div><div>py.test -v --junitxml junit.xml --cov-report xml --cov my_project</div><div> </div><div>You need to enable the &quot;Cobertura&quot; plugin to be able to catch the xml from pytest-cov</div>


<div><br></div><div>And that should do it.</div></div></blockquote><div><br></div><div>Errr... just checked and I am missing some stuff that you need for this to work:</div><div><br></div><div>In post-build-actions:</div>

<div><br></div><div>* Check &quot;Publish JUnit test suite result report&quot;</div><div>* Test reports XMLs should have: &quot;junit.xml&quot;</div><div>* Check &quot;Publish Cobertura Coverage Report&quot;</div><div>* Cobertura xml report pattern should say: &quot;coverage.xml&quot;</div>

<div>* Coverage Metric Targets is set to Methods</div><div><br></div><div> </div><div>Now *that* should do it :)</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="gmail_quote"><div class="im"><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
</div>I am not aware of a pytest plugin that outputs coverage info parseable by<br>
Jenkins.  There is only &quot;pytest-cov&quot; which provides coverage output in<br>
html or text pages.  Not sure how hard it is to extend it or if anybody<br>
tried yet.<br>
<br>
best,<br>
holger<br>
<br>
&gt; --<br>
<div>&gt; Chris<br>
&gt; Not to be taken literally, internally, or seriously.<br>
<br>
</div>&gt; _______________________________________________<br>
&gt; testing-in-python mailing list<br>
&gt; <a href="mailto:testing-in-python@lists.idyll.org" target="_blank">testing-in-python@lists.idyll.org</a><br>
&gt; <a href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
<font color="#888888"><br>
<br>
--<br>
<br>
_______________________________________________<br>
testing-in-python mailing list<br>
<a href="mailto:testing-in-python@lists.idyll.org" target="_blank">testing-in-python@lists.idyll.org</a><br>
<a href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
</font></blockquote></div></div><br>
</blockquote></div><br>