<br><br><div class="gmail_quote">On Mon, Mar 14, 2011 at 3:11 PM, Jorge Vargas <span dir="ltr">&lt;<a href="mailto:jorge.vargas@gmail.com">jorge.vargas@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;">

Hello all,<br>
<br>
First of all although I dont&#39; think there is anything with a different<br>
opinion I totally loved it.<br>
<br>
It&#39;s a shame I missed it last year.<br>
<br>
Second (and I&#39;m sorry if you did this but I got in a little late) I<br>
thought it will be more like other BoF where people will discuss<br>
rather than lighting talks. Because I was hoping to get some help to<br>
find out why our tests are so slow. So here is my lightning talk<br>
regarding that.<br>
<br>
Hi, I got a problem ( halp! )<br>
&lt;picture of a sad kitty&gt;<br>
My tests run slooooooooow<br>
But I don&#39;t know who to blame<br>
This is django so it&#39;s probably it&#39;s fault.<br>
&lt;haters got to hate&gt;<br>
Or perhaps it&#39;s that my boss does not want to let me move them over to<br>
nose Still stuck on vanilla unittest :(<br>
Or perhaps it&#39;s just a bad setup ? more fixtures around ?<br>
Or maybe it&#39;s some of the crazyness we do to have a standalone package<br>
that does not require a django project.<br>
We currently have 501 tests on our model only.<br>
ALL of them just check our business logic and raise validation errors<br>
for different problems and such.<br>
Running under jenkins in a VPS with sqlite and postgres (so 1002 runs)<br>
it takes anywhere from 20-30minutes to run.<br>
<br>
So who is wrong? me? us? jenkins? django? unittest ? Who to blame ?<br>
I&#39;ll love to run my tests more but 30 minutes feedback is just crazy.<br></blockquote><div><br></div><div>Independently of why they are slow, I would play with py.test and the xdist plugin that will </div><div>allow you to run tests in parallel.</div>

<div><br></div><div>At work, we went from 20 minute test runs to around 5.</div><div><br></div><div>Since your tests are &quot;vanilla unittest&quot; you should be able to try out py.test without issues.</div><div><br></div>

<div>For best results, try to match the number of processes to the number of cores on your machine.</div><div><br></div><div>On our 4 core testing server, the command to run in parallel looks like this:</div><div><br></div>

<div>    py.test -n 4</div><div><br></div><div>It should work out of the box :)</div><div><br></div><div><br></div><div>You need to install the following:</div><div><br></div><div>pip install pytest</div><div>pip install pytest-xdist</div>

<div><br></div><div><br></div><div>In that order. Please post back if you do try it to see how it went! </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Looking forward for Santa Clara !<br>
<br>
_______________________________________________<br>
testing-in-python mailing list<br>
<a href="mailto:testing-in-python@lists.idyll.org">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>
</blockquote></div><br>