Results 1 to 4 of 4

Thread: SauceLabs Integration

  1. #1
    Sencha Premium Member
    Join Date
    Apr 2016
    Posts
    5

    Default SauceLabs Integration

    By default ST doesn't update the 'passed' annotation after tests finish, not being able to use SauceLabs Analytics since test jobs will always have an unknown status when they end.

    Is there a way to update this annotation automatically once the test ends using ST's current capabilities or a suggested workaround?

    Implementation would require calling SauceLabs API with JOB_ID, which for ST is session id listed in:
    "Agent registered (session ID: 123456abcdef)".


    Sauce Labs ref

    Cheers,
    Razvan

  2. #2
    Sencha - Test Dev Team marcelofarias's Avatar
    Join Date
    Nov 2011
    Location
    Boca Raton, FL
    Posts
    75
    Answers
    5

    Default

    Hi Razvan, thanks for your feedback

    This feature is planned to be rolled out in the next major release.

    For the time being, in case you're using a WebDriver scenario, you can get the session ID from the driver (ST.defaultContext.driver.requestHandler.sessionID) and use it to make Ajax calls to SauceLabs' API.

    Regards
    Marcelo Bukowski de Farias

  3. #3
    Sencha Premium Member
    Join Date
    Apr 2016
    Posts
    5

    Default

    Hi,

    That sounds good! Thanks for your feedback, considering your suggestion as a workaround.
    This approach would work if you are in the context of a running test being able to access ST object, but when you automate the tests, on a CI server for example, you will usually run a suite of tests from command line.
    eg.
    Code:
    stc run -s integration-tests ...
    Each SauceLabs job will consist of multiple tests, the goal would be to have the job marked accordingly once job completed. Is there a workaround to be able to use curl for example?(the missing part is job id access when running tests from command line)

    Cheers,
    Razvan

  4. #4
    Sencha - Test Dev Team marcelofarias's Avatar
    Join Date
    Nov 2011
    Location
    Boca Raton, FL
    Posts
    75
    Answers
    5

    Default

    Under the hood, STC and Studio share the very same engine. That said, for WebDriver scenarios, consider the following:


    • For each browser in the selected pool, a child process will be created
    • These child processes are what we call sandboxes, for they are completely isolated contexts running in parallel
    • If you specify concurrency > 1 for a given browser, you will have N sandboxes instead of 1, and each one will be assigned a slice of the whole set of test suites
      • That is meant to speed up the whole test run, as long as you have enough parallel sessions available on Sauce Labs (or BrowserStack, or your own Selenium grid)
      • Bear in mind that your tests have to be independent of each other, since they will be split in multiple sandboxes

    • Each sandbox creates a WebDriver context (ST.defaultContext), and this context will create a Selenium session for you, which will be used only in the scope of the sandbox


    TL;DR
    So, in the end of the day, you can reference ST.defaultContext.driver.sessionID and use it (lets say, in afterAll blocks) to transition the respective Sauce Labs job state.
    Marcelo Bukowski de Farias

Similar Threads

  1. Ext JS to EJB Integration
    By vanuatoo in forum Ext: Q&A
    Replies: 8
    Last Post: 30 Sep 2013, 4:00 AM
  2. Ext js integration with DWR
    By abhinavchugh in forum Community Discussion
    Replies: 2
    Last Post: 23 May 2012, 2:48 PM
  3. EXT-GWT and EXT-JS integration
    By aechannaveen in forum Community Discussion
    Replies: 3
    Last Post: 23 May 2012, 9:17 AM
  4. JSF Integration
    By dimitrij.zub in forum Ext 2.x: User Extensions and Plugins
    Replies: 3
    Last Post: 10 Jun 2008, 7:31 AM
  5. GWT Ext Integration
    By sjivan in forum Community Discussion
    Replies: 12
    Last Post: 9 Jul 2007, 3:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •