Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i make a Selenium WebDriver run for many hours(CHO) without it causing a crash / OutOfMemory problems?

I am using selenium-2.30.0 to run a single test(on windows) which runs for many hours (~ 8 Hrs). I was using the FF driver, but it runs out of memory after just 45 minutes or less, & the test execution just hangs. I was unable to use HTMLUnitDriver (i thought a pure java solution was the answer) to run the same way as the FF driver (as it needs to wait for page loads & I definitely didn't want to put random thread sleeps in my code or implement any new function by extending the HTMLUnitDriver).

  • I cannot break the test case to multiple smaller units.
  • I cannot reload the driver as and when i see heavy memory utilization

Is there any way to get this working?

like image 770
sarathrami Avatar asked Oct 21 '22 15:10

sarathrami


1 Answers

I found this link:creating-firefox-profile-for-your-selenium-rc-tests, & was quite helpful. Created a new firefox profile with absolute minimal settings, & the test has been running without issues for the last 4 hours. Thanks a lot for the help guys !

like image 176
sarathrami Avatar answered Oct 27 '22 10:10

sarathrami