Results 1 to 2 of 2

Thread: Understanding Sencha Test Concept

  1. #1
    Sencha Premium User
    Join Date
    Sep 2010
    Location
    UK
    Posts
    125
    Vote Rating
    6
      0  

    Default Answered: Understanding Sencha Test Concept

    Hi,

    I know nothing about Sencha Test and I want to understand the concept between the Project Location URL, Parking Lot URL and Test Subject URL and where are Sencha Test and Jasmine or Web Driver fit into the picture. I would be grateful if you can point to any documents or diagrams that explain it.

    Many thanks
    Joe

  2. Hi Joe,

    I'm not sure we have a diagram that explains this. Parts of the concepts are covered in our documentation (for example, In-Browser vs. WebDriver testing: https://docs.sencha.com/sencha_test/...webdriver.html).

    I'll explain the other pieces below:

    Project Location URL - this is the default URL for all scenarios within the test project. If a Scenario doesn't have an explicit URL set, it will inherit the Project Location URL.

    Scenario Location URL - this allows you to override the Project Location URL. You can either define a whole URL, e.g. "https://www.google.com", or append a route or query string parameters that get added to the Project Location URL, e.g. "#user/1".

    On the test runner screen for In-Browser scenarios, you will see buttons that give you two links:

    Test Subject URL - the URL to directly access the Sencha Test proxied version of your app. The proxied version of your app has the injected Sencha Test runner files, Jasmine, along with your test suite files.

    Parking Lot URL - In-Browser scenarios have a parking lot URL; a URL that any local or remote (on the same network) browser can access while it "waits" for tests to be commenced. For example, on your phone (or another machine on the same network), access the parking lot URL via your machine's IP address (e.g. http://10.0.0.118:8800). You should then see the message "This browser window is available for work from Sencha Studio". Over in Sencha Studio, your device's browser should show up in the list of available browsers, and the browser waits for tests to be run. Checking/ticking the browser in the list will cause the Parking Lot page to redirect to the proxied version of your app. You can then run tests. After tests are finished executing, the browser returns to the Parking Lot page and waits for the next test run to commence.

    Jasmine is the test framework used within Sencha Test, for both WebDriver and In-Browser tests.

    When you have WebDriver selected as the scenario type, your tests are run in a sandbox, isolated from the browser. WebDriver is used to communicate with the browser, hence you are limited to just using "ST." and Jasmine APIs. This is more suited to end-to-end testing. This does give you some nice features though - your WebDriver test suites can leverage Node's "require" capability to leverage different Node modules, as described here: https://docs.sencha.com/sencha_test/...re_syntax.html

    Sencha Test also gives you the powerful Futures APIs (available under the "ST." namespace). These help you to reference the different types of components through Ext JS Component Query syntax (rather than DOM query, XPath, or element ID, which are not stable options). These APIs also help with handling timing related issues with testing dynamic web apps like Ext JS, and provides you with helper methods to work with different components, e.g.

    Code:
    ST.grid('#mygrid')
        .rowWith('company', 'Sencha')
        .cellAt(2)
        .click();
    Hope this helps to explain things. I'll make sure some of these descriptions get added to an upcoming version of the docs, so that this is all clearer.

    Thanks

  3. #2
    Sencha - Sales Team daniel.gallo's Avatar
    Join Date
    Apr 2009
    Location
    Redwood City, CA
    Posts
    253
    Answers
    32
    Vote Rating
    31
      0  

    Default

    Hi Joe,

    I'm not sure we have a diagram that explains this. Parts of the concepts are covered in our documentation (for example, In-Browser vs. WebDriver testing: https://docs.sencha.com/sencha_test/...webdriver.html).

    I'll explain the other pieces below:

    Project Location URL - this is the default URL for all scenarios within the test project. If a Scenario doesn't have an explicit URL set, it will inherit the Project Location URL.

    Scenario Location URL - this allows you to override the Project Location URL. You can either define a whole URL, e.g. "https://www.google.com", or append a route or query string parameters that get added to the Project Location URL, e.g. "#user/1".

    On the test runner screen for In-Browser scenarios, you will see buttons that give you two links:

    Test Subject URL - the URL to directly access the Sencha Test proxied version of your app. The proxied version of your app has the injected Sencha Test runner files, Jasmine, along with your test suite files.

    Parking Lot URL - In-Browser scenarios have a parking lot URL; a URL that any local or remote (on the same network) browser can access while it "waits" for tests to be commenced. For example, on your phone (or another machine on the same network), access the parking lot URL via your machine's IP address (e.g. http://10.0.0.118:8800). You should then see the message "This browser window is available for work from Sencha Studio". Over in Sencha Studio, your device's browser should show up in the list of available browsers, and the browser waits for tests to be run. Checking/ticking the browser in the list will cause the Parking Lot page to redirect to the proxied version of your app. You can then run tests. After tests are finished executing, the browser returns to the Parking Lot page and waits for the next test run to commence.

    Jasmine is the test framework used within Sencha Test, for both WebDriver and In-Browser tests.

    When you have WebDriver selected as the scenario type, your tests are run in a sandbox, isolated from the browser. WebDriver is used to communicate with the browser, hence you are limited to just using "ST." and Jasmine APIs. This is more suited to end-to-end testing. This does give you some nice features though - your WebDriver test suites can leverage Node's "require" capability to leverage different Node modules, as described here: https://docs.sencha.com/sencha_test/...re_syntax.html

    Sencha Test also gives you the powerful Futures APIs (available under the "ST." namespace). These help you to reference the different types of components through Ext JS Component Query syntax (rather than DOM query, XPath, or element ID, which are not stable options). These APIs also help with handling timing related issues with testing dynamic web apps like Ext JS, and provides you with helper methods to work with different components, e.g.

    Code:
    ST.grid('#mygrid')
        .rowWith('company', 'Sencha')
        .cellAt(2)
        .click();
    Hope this helps to explain things. I'll make sure some of these descriptions get added to an upcoming version of the docs, so that this is all clearer.

    Thanks
    Daniel Gallo
    Senior Solutions Architect
    Sencha Inc.

Similar Threads

  1. Replies: 1
    Last Post: 3 Feb 2017, 8:59 AM
  2. Replies: 5
    Last Post: 2 Feb 2017, 8:42 AM
  3. Replies: 1
    Last Post: 9 Aug 2016, 3:46 AM
  4. Replies: 2
    Last Post: 4 Aug 2016, 4:27 AM
  5. Replies: 3
    Last Post: 3 Aug 2016, 5:01 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
  •