Using Docker, with Selenium and Pytest for Parallel Tests

I'm trying to use these all together to run parallel tests in headless chrome:

Docker, Selenium, Piteste

However, I'm wondering where it makes sense to run the parallel part of the system?

Docker can do this (using a selenium grid). Both can be used to run parallel (and distributed) selenium tests. eg.

https://github.com/elgalu/docker-selenium

https://github.com/zalando/zalenium

Also Pytest has its own way to run parallel tests (using pytest-xdist) eg.

http://pytest.org/dev/xdist.html

Would it be easier to run 10 parallel pytest-xdist than to run 10 docker containers?

I would appreciate the advantages / disadvantages for each.

Also, any idea how to use these things together? Information on this seems very scarce.

+3


source to share


1 answer


You create as many containers as you need / want, then you let xdist know the IPs of the containers and if you need UI tests then pytest has pytest-splinter and if you need bdd scripts you can use pytest-bdd ...



0


source







All Articles