Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

510
Visualizações
Using Docker, with Selenium and Pytest to run parallel tests

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

Docker, Selenium, Pytest

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

Docker can do this (using selenium grid). Both these can be used to run parallel (and distributed) selenium tests. e.g.

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

https://github.com/zalando/zalenium

Also Pytest has its own way of running parallel tests (using pytest-xdist) e.g.

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

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

I would be grateful to find out the advantages/disadvantages are for each.

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

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

You create as much as you need/want containers then you will let know xdist IPs of containers and if you need UI tests then pytest has pytest-splinter and if you need bdd scenarios you can use pytest-bdd.

over 4 years ago · Santiago Trujillo Relatório

0

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

Each part will contribute for the parallelism to happen. You need Selenium HUB to orchestrate available browsers to run a test. You can have n browser running in headless mode, each one isolated in its own container.

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

Pytest will parallelize the test execution for you, bur not the instantiation and orchestration to the available browsers.

Summarizing:

Problem: You need to run UI (Selenium) tests in parallel. You will need N amount of browsers available to run this test.

Solution: You can start N nodes of headless chrome from docker. problem: You have 10 different connection options to give to your drivers in your tests.

Solution: Start selenium hub and let it manage these for you. So you have to concern with only one connection point and then it will give you the browser that is free to run that test.

Problem: You run you tests now and only one browser is being used. Solution: Use xdist to instruct pytest to run X amount of tests per time. X in this case can match with N number of browser available.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda