[TIP] massive parallel testing in python

Laurent Ploix laurent.ploix at gmail.com
Sun Dec 9 11:39:25 PST 2007

Hi Noah,

Tell me, does it take time to generate the tests themselves, before you run
them ?

That question may seem strange, so let me explain:

Point 1 : One way to create tests is to "yield" them from a testing
function. This is a very powerful feature. Then you can generate your tests
out of a database, for instance. You don't need to have your tests
hardcoded. This may not seem a good idea in many cases, but it works quite
well to check that all the content of a database is properly set up, for
instance. One problem is that just creating the tests themselves may take

Point 2 : One architecture I though we could implement is to have a "master
nosetests" and a lot of "slaves nosetests". Each of them would have the same
tests to run, BUT with the following algorithms:

- The slaves, before running a test, would ask the master if they must or
not (skip or not)
- The master would be here just to tell the slaves if they must / must not
run the tests

That architecture may seem strange, but we actually have something very
similar (with only one slave) with a special plugin of ours which handles
crashes (released soon, hopefully). The master is just in charge of
gathering the results and telling the slaves what to run; and the slave is
in charge of running them. If the slave dies (because of a crash), it it
restarted by the master, it gathers the same tests as before, but the master
will not tell the slave to run the already-run tests.

It should not be too difficult to generalize with a lot of slaves. But if
gathering the tests takes time, that's a problem, because all slaves will
have to do so.

 2007/11/21, Noah Gift < noah.gift at gmail.com>:
> I have another "thing" I am working on where I am interesting in doing
> massive parallel testing as a current series of thousands of tests
> takes over 24 hours.  I am extremely ignorant of open source tools in
> Python that do this already, but one Idea I had was to use parallel
> python and to setup a bunch of testing nodes:
> http://www.parallelpython.com/
> Is there anything pre-built that someone could recommend?  The Pyvix
> buildbot stuff seems interesting, but I am not sure if that directly
> applies for me.
> Noah
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python

Laurent Ploix

Laurent Ploix
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.idyll.org/pipermail/testing-in-python/attachments/20071209/6f06bde9/attachment.htm 

More information about the testing-in-python mailing list