[pytest-dev] Introduction
Bruno Oliveira
nicoddemus at gmail.com
Mon Jan 25 19:47:03 EST 2016
Hi Isaul!
On Mon, Jan 25, 2016 at 5:42 PM Isaul Vargas <isaulv at gmail.com> wrote:
> Hi everyone! My name is Isaul Vargas and I work as a software tester.
> I have been using py.test since 2013 and I really like the fixture
> interface of
> Py.test it's a powerful abstraction!
> ...
> So, I've decided to volunteer my time to help improve the Pytest-xdist
> plugin so that we have a
> true queue based system of test distribution so that every slot is always
> busy running tests, and save
> developers a ton of time!
>
Excellent, thanks for your enthusiasm and willingness to contribute! It is
certainly appreciated. :)
I would like to thank Ronny for taking the time to explain how the current
> system works, and what
> changes are needed to make this happen. I am motivated to get this issue
> fixed; so that we are the
> first test runner (that I know of) to use a queue based system that
> doesn't simply batch tests.
>
I also wrote an overview here:
https://github.com/pytest-dev/pytest-xdist/blob/master/OVERVIEW.md.
For those wondering why batching is bad, when you have tests that take 2-3
> minutes to complete,
> plus a few tests that take 5 minutes to complete; if you batch tests such
> that 1 workers gets all the 5 minutes tests
> and another workers gets all the short tests then the total run time is
> almost the same as running all the large tests
> in serial.
>
I feel you. We had a similar problem at work as well.
I look forward to improving this aspect of pytest-xdist, and I am highly
> motivated to get this done. I look forward
> to diving deep into the code and learn the internals of pytest.
>
We had discussed how to avoid distributing tests in batches, and if I
remember correctly it was a matter of changing some logic[1] in DSession so
it just sends a single test for each node. There is also the restriction
that each node must have at least 2 tests to start running them due to how
the pytest_runtest_protocol hook works [2].
My suggestion is to hack it into your fork until you get the speed up you
want (of course feel free to ask for help), and then we can discuss the
best way to implement it and put it as an user option.
[1]
https://github.com/pytest-dev/pytest-xdist/blob/master/xdist/dsession.py#L311
[2]
http://pytest.org/latest/writing_plugins.html#_pytest.hookspec.pytest_runtest_protocol
Cheers,
Bruno.
> _______________________________________________
> pytest-dev mailing list
> pytest-dev at python.org
> https://mail.python.org/mailman/listinfo/pytest-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20160126/a571694b/attachment.html>
More information about the pytest-dev
mailing list