Currently, I have an automation framework that consists of the following stack:
- Python
- Pytest Framework (and pytest-xdist parallel mechanized)
- Selenium
- Allure report system
- Jenkins
I'm going to add a docker containerization system as well, to run tests using it on a windows server.
I'm running my tests using pytest's internal parallel run (pytest-xdist) functionality using 'workers' the run command looks like this:
os.system("pytest -v -s --alluredir="'C:\AllureReports\Data'" --html=report.html --developer=dmitriy --timeout=60 --self-contained-html --dist=loadfile -n=3 -m=regression")
As you can see '-n=3' is the number of 'nodes' that the suite will be executed. In other words, the regression suite will run in a parallel run of 3 nodes.
Can you tell me if it is possible to avoid using Selenium-Grid mechanized, and use this pytest's internal parallel run system instead -> pytest-xdist, and how?
Will appreciate relevant technical articles or explanations of how it can be done.
I have gone over this question - pytest-xdist vs selenium hub but got only a really overview impression which is not enough