So I have two test cases in a map. From command prompt I type "pytest -n 2" then hit Enter. Instead of opening two browsers and execute them in parallel, pytest is opening 4 browsers, but only two of them are executing the test cases.
And if I add one more test case to that map, and execute "pytest -n 3" from command prompt, pytest is opening 9 browser, from which only 3 are executing the test cases. What I'm doing wrong?

  • Could you share part of the code of your test so people can have a clearer view of where the problem could be? – Jean-Francois T. Sep 3 '19 at 1:36
  • 1
    Hi. I solved the issue with pytest-parallel. Thank you for your interest. – rodut Sep 10 '19 at 19:05
  • @rodut Could you convert your comment into answer and explain how pytest-parallel solved you issue? – Prome Nov 21 '19 at 10:47
  • Sure. I was just starting to study automation so initially I had two "driver = webdriver.Chrome()", one in the setUp method, and one in tearDown method. I solved this simple, by declaring it only in main class. If I can help you any further, just let me know. – rodut Nov 22 '19 at 11:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.