Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dealing with timeouts in Sauce Labs

I have Web Driver code that works without issue when running on a local instance of a browser. My code interacts with the browser, but has a period where it kicks off some background tasks via terminal in order to set up data for the remainder of the test. This is an end to end test and it needs to execute in this order, leaving the browser idle for a short period of time, usually under 5 minutes. After the background tasks complete, the browser is then again interacted with.

Unfortunately when I run my rests remotely from Sauce Labs, when running the background tasks Sauce Labs finds the browser as being inactive for longer than 90 seconds and assumes there is an issue. This results in a failure even though the test never fails. I can't seem to find anything in the documentation regarding how to increase the idle timeout. Is there a way to do this?

like image 753
Dave Avatar asked Jan 01 '26 20:01

Dave


1 Answers

Saucelabs has a few different types of timeouts:

  • Max test duration
  • Command timeout
  • Idle test timeout

More info: https://wiki.saucelabs.com/display/DOCS/Test+Configuration+Options#TestConfigurationOptions-Timeouts

Either the max duration or idle timeout should help you out. I think the idle time still burns down sauce test minutes though.

like image 60
kblmfld Avatar answered Jan 03 '26 13:01

kblmfld



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!