Python Selenium Parallel Testing using pytest - Part 1

preview_player
Показать описание
Run Python Selenium Tests in Parallel on Chrome browser

Welcome to MobileTesting YouTube Channel

This video explains how to run Python Selenium Tests in Parallel on Chrome browser. Split your test suite across multiple Google Chrome browser sessions and run them in Parallel.

Packages needed:
pytest
pytest-xdist
pytest-rerunfailures
selenium

Command to run test cases in parallel:
pytest -n 5

We are covering two scenarios in this series:

First Scenario:
Run 4 test scripts in Parallel in 4 Chrome browser sessions

Second Scenario - Check PART 2 video:
Run 4 test scripts in Parallel split across 3 browsers - Chrome, Firefox and Safari

Selenium Server Download url:

GitHub Repository:
Рекомендации по теме
Комментарии
Автор

How would you run multiple instances of the SAME script using pytest, is it possible? I have a script to fill out a web form but performance is key so I need to fill out many forms at the same time, means running the same test case in batches of 10, 15 chrome instances per iteration as I'm reading the data from an excel sheet and I need to run the same test case for hundreds of records, that's why I'd like to execute the same script in batches of 10, 15 or more instances. Thanks!

mava
Автор

Thanks, this helped. Update the requirements.txt, multiprocessing==2.6.2.1 will fail to install.

torrtooga
Автор

Could you please tell me how in your case it shows with percentage?

turalaliyev
Автор

Hello, I have one script which is to capture data from an e-commerce site but the problem is there are 40440 products which will take a month or 2 months to extract all data so can it be possible to run the same script in parallel to reduce the time? if yes then how?

deepakchaurasia