TestProject Forum

Desired Capabilities Saucelabs execution

Hello there!

I use Saucelabs as the agent when executing Jobs. I have setup some desired capabilities for the Job which seem to work ok; however I am not able to set the Saucelabs maxDuration capability.
The default value in Saucelabs is 30min of execution, but any value I set for this capability is being ignored in Saucelabs (ie.: “maxDuration: 960” is ignored and the job execution takes much longer than this)
This is my desiredCapabilities for one of the Jobs I have:

“browserName”: “chrome”,
“browserVersion”: “latest”,
“platformName”: “win10”,
“chromedriverVersion”: “97.0.4692.71”,
“seleniumVersion”: “4.1.1”,
“maxDuration”: 180,
“screenResolution”: “1920x1440”

I have setup these capabilities as described in the Test Configuration Options section in Saucelabs (Test Configuration Options | Resources & Community)

I appreciate your help very much as my test cases are failing.

Hi @luis.stolk,
Saucelabs own capabilities should be inside sauce:options block
For example :

  "sauce:options": {
    "maxDuration": 1800

Please let ne know if that solved your issue.

Working great now!
Many thanks Tal for your help!
Have a great day