Dealing with timeouts in Sauce Labs












3















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?










share|improve this question


















  • 1





    Can you provide some of your selenium code? WebDriver initialization, etc?

    – barak manos
    Feb 4 '14 at 22:24
















3















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?










share|improve this question


















  • 1





    Can you provide some of your selenium code? WebDriver initialization, etc?

    – barak manos
    Feb 4 '14 at 22:24














3












3








3








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?










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 4 '14 at 22:08









DaveDave

7263923




7263923








  • 1





    Can you provide some of your selenium code? WebDriver initialization, etc?

    – barak manos
    Feb 4 '14 at 22:24














  • 1





    Can you provide some of your selenium code? WebDriver initialization, 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












2 Answers
2






active

oldest

votes


















2














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.






share|improve this answer

































    0














    when you set up your desired_capabilities add:



    desired_capabilities["idle-timeout"] = "180"


    I did 180 seconds here, but you can do whatever...






    share|improve this answer























      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
      });


      }
      });














      draft saved

      draft discarded


















      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









      2














      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.






      share|improve this answer






























        2














        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.






        share|improve this answer




























          2












          2








          2







          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.






          share|improve this answer















          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.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 19 '18 at 8:01









          Stefan Birkner

          15.9k74355




          15.9k74355










          answered Feb 4 '14 at 22:55









          kblmfldkblmfld

          46657




          46657

























              0














              when you set up your desired_capabilities add:



              desired_capabilities["idle-timeout"] = "180"


              I did 180 seconds here, but you can do whatever...






              share|improve this answer




























                0














                when you set up your desired_capabilities add:



                desired_capabilities["idle-timeout"] = "180"


                I did 180 seconds here, but you can do whatever...






                share|improve this answer


























                  0












                  0








                  0







                  when you set up your desired_capabilities add:



                  desired_capabilities["idle-timeout"] = "180"


                  I did 180 seconds here, but you can do whatever...






                  share|improve this answer













                  when you set up your desired_capabilities add:



                  desired_capabilities["idle-timeout"] = "180"


                  I did 180 seconds here, but you can do whatever...







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Oct 1 '14 at 0:13









                  user3662456user3662456

                  797




                  797






























                      draft saved

                      draft discarded




















































                      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.




                      draft saved


                      draft discarded














                      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





















































                      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







                      Popular posts from this blog

                      How to send String Array data to Server using php in android

                      Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

                      Is anime1.com a legal site for watching anime?