title: Using Docker, with Selenium and Pytest to run parallel tests
body: <p>I'm trying to use these all things together to run parallel tests in a headless chrome: </p>
  
  <p>Docker, Selenium, Pytest</p>
  
  <p>However, I'm wondering where it makes sense to run the parallel part of the system? </p>
  
  <p>Docker can do this (using selenium grid). Both these can be used to run parallel (and distributed) selenium tests. e.g.</p>
  
  <p><a href="https://github.com/elgalu/docker-selenium" rel="nofollow noreferrer">https://github.com/elgalu/docker-selenium</a></p>
  
  <p><a href="https://github.com/zalando/zalenium" rel="nofollow noreferrer">https://github.com/zalando/zalenium</a></p>
  
  <p>Also Pytest has its own way of running parallel tests (using pytest-xdist) e.g.</p>
  
  <p><a href="http://pytest.org/dev/xdist.html" rel="nofollow noreferrer">http://pytest.org/dev/xdist.html</a></p>
  
  <p>Would it be easier to run 10 parallel pytest-xdist than running 10 docker containers? </p>
  
  <p>I would be grateful to find out the advantages/disadvantages are for each.</p>
  
  <p>Also, any idea how to use these things together? Information on this seems really sparse.</p>