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?
selenium selenium-webdriver saucelabs
add a comment |
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?
selenium selenium-webdriver saucelabs
1
Can you provide some of your selenium code?WebDriverinitialization, etc?
– barak manos
Feb 4 '14 at 22:24
add a comment |
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?
selenium selenium-webdriver saucelabs
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?
selenium selenium-webdriver saucelabs
selenium selenium-webdriver saucelabs
asked Feb 4 '14 at 22:08
DaveDave
7263923
7263923
1
Can you provide some of your selenium code?WebDriverinitialization, etc?
– barak manos
Feb 4 '14 at 22:24
add a comment |
1
Can you provide some of your selenium code?WebDriverinitialization, etc?
– barak manos
Feb 4 '14 at 22:24
1
1
Can you provide some of your selenium code?
WebDriver initialization, etc?– barak manos
Feb 4 '14 at 22:24
Can you provide some of your selenium code?
WebDriver initialization, etc?– barak manos
Feb 4 '14 at 22:24
add a comment |
2 Answers
2
active
oldest
votes
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.
add a comment |
when you set up your desired_capabilities add:
desired_capabilities["idle-timeout"] = "180"
I did 180 seconds here, but you can do whatever...
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f21564554%2fdealing-with-timeouts-in-sauce-labs%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
add a comment |
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.
add a comment |
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.
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.
edited Nov 19 '18 at 8:01
Stefan Birkner
15.9k74355
15.9k74355
answered Feb 4 '14 at 22:55
kblmfldkblmfld
46657
46657
add a comment |
add a comment |
when you set up your desired_capabilities add:
desired_capabilities["idle-timeout"] = "180"
I did 180 seconds here, but you can do whatever...
add a comment |
when you set up your desired_capabilities add:
desired_capabilities["idle-timeout"] = "180"
I did 180 seconds here, but you can do whatever...
add a comment |
when you set up your desired_capabilities add:
desired_capabilities["idle-timeout"] = "180"
I did 180 seconds here, but you can do whatever...
when you set up your desired_capabilities add:
desired_capabilities["idle-timeout"] = "180"
I did 180 seconds here, but you can do whatever...
answered Oct 1 '14 at 0:13
user3662456user3662456
797
797
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f21564554%2fdealing-with-timeouts-in-sauce-labs%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Can you provide some of your selenium code?
WebDriverinitialization, etc?– barak manos
Feb 4 '14 at 22:24