Hi, On 10/08/2009 03:28 PM, Jonathan Ballet wrote:
Hi Christian,
On Fri, Oct 2, 2009 at 2:00 PM, Christian Theune <ct@gocept.com> wrote:
Hi,
I *thought* the test runner had a feature to run tests in randomized order, but I can't find it. Is that something that Zope 2 had and that was never ported to zope.testing?
I couldn't find in the history either.
/me is confused.
I was about to send the same mail today, but I found out your mail before.
I didn't find anything relative to random tests in Zope 2 (but I'm not familiar at all with Zope 2, so I'm pretty sure I could have missed something), and I ended up writing a new feature for zope.testing's testrunner.
I made a branch 'shuffle-tests', available on the Mercurial repository at http://bitbucket.org/multani/zope.testing-shuffle/ , which adds two new options:
* --shuffle to randomize the order of the tests in a layer (layers are not yet randomized, I didn't look at it yet); * --shuffle-seed XXX, to initialize the RNG with a specific value, which allows to reproduce a specific randomization of tests (inspired by this thread http://lists.idyll.org/pipermail/testing-in-python/2009-April/001812.html )
Sounds right. It could even be folded into a single option: --shuffle[=XXX]
It's not yet ready-to-commit: it still misses tests (tricky to write) and more documentation.
That's what working branches are for. You do have commit rights, don't you? It's not that tricky to test: seed the RNG from outside the tests.
However, feedbacks are welcome!
Thanks for the work! Christian -- Christian Theune · ct@gocept.com gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1 Zope and Plone consulting and development