[TIP] py.test for distributed blackbox testing using Selenium
holger at merlinux.eu
Sat Jan 21 12:59:37 PST 2012
On Sat, Jan 21, 2012 at 22:11 +0530, Baiju M wrote:
> I was trying to use the xdist plugin for distributed black box testing
> using Selenium.
> I have N number of isolated identical app servers (same DB, same
> configuration etc.).
> I was following this instruction:
> Each test should connect to the above mentioned distinct app servers. What
> approach would be good in this kind of situation to get the IP& PORT of these
> servers ? Should I go for some external queue ? Or can I do it using a
> a queue in the same process ? May some serialization of this app server
> detailes (IP&PORT) would be sufficient ?
> I am looking to forward to your opinions/suggestions.
You can extend pytest to send the different nodes different information
and they can then make sure to provide it to tests or for setup
purposes. For an exmaple, look at this acceptance test:
to see how information is exchanged between the master and slave nodes.
If you setup some information/list of port/IPs on the master you
should be able to use those to send them to the slaves and then
use them from a pytest_sessionstart() or similar hooks. Almost
all hooks have access to the test "config" object which has the
"slaveinput" attribute on slaves.
> BTW, I started looking to pytest after reading this article:
> Baiju M
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
More information about the testing-in-python