Company
Date Published
Author
Santiago Suarez OrdoƱez
Word count
499
Language
English
Hacker News points
None

Summary

Running your Selenium tests in parallel: Python` The current approach to running Selenium tests in Python involves executing each test file one by one from the command line, which can be time-consuming as the test base grows. To improve this, a script can be written to run all test files automatically, reducing execution time but not significantly. Utilizing subprocess and Popen allows for concurrent execution of multiple processes, resulting in substantial speedup compared to sequential execution, with an execution time of 8.3 minutes. However, this method presents the drawback of output being unordered. The definitive solution is to run all individual test methods concurrently using nose, a testing framework that supports multiprocessing, achieving an impressive execution time of just 3 minutes.