Skip to main content
Revolutionize your testing approach with our latest products - Test Observability, Test Management & Accessibility Testing.

Integrate BrowserStack Automate with Tricentis Tosca

This document guides you with the step by step process to execute Tricentis Tosca tests on BrowserStack.

Introduction

Tricentis Tosca accelerates testing with a script-less, no-code approach for test automation. Integrating Tricentis Tosca with BrowserStack will help you to run the Tricentis Tosca recorded test scripts on 3000+ real devices and desktop browsers.

Pre-requisites

  • BrowserStack Username and Access Key to set up the BrowserStack integration. After logging into your BrowserStack account, visit the Settings page and copy your Username and Access Key. You can also sign up for a free trial here.
  • A registered account at Tricentis. You can sign up for a demo account here. You need to download Tosca + ARA (Automation Recording Assistant).

Integration Steps

Note: If you have ready Tosca tests that run perfectly fine locally then you can skip to Sl. No. 18 in the steps given below to learn how to make the connection with BrowserStack and make your tests run there.
  1. Launch the Tosca Commander.

    tosca commander menu

  2. Now, create a new project by selecting PROJECT → New and set the name for the new workspace as Selenium.

    tosca create new project

  3. Once the project is created successfully, select the Modules tab to start recording the sample test case.

    tosca modules tab to start recording tests

  4. The sample test case will search for BrowserStack on Google and from the results displayed will click the first link that resolves to BrowserStack’s main web page. Finally, we will confirm that we are on https://www.browserstack.com.

  5. To record the actions and create the test steps, first ensure that you have a browser open on your system to manually perform the steps which will be recorded by Tosca XScan. To initiate Tosca XScan, right click on the Modules folder then select Scan → Application.

    Initiate Tosca XScan

  6. This will prompt you to select the app window you wish to record. Here we have Chrome browser up and running with the initial URL. You can select the Chrome window option and click Scan.

    Tosca select application

  7. Clicking the Scan button will prompt you to install the extension. Tosca Automation requires that its browser extension be installed on the browser to record elements that can be interacted with.

    Tosca add extension

  8. Once the extension is installed then Tosca’s XScan will be able to interact with the browser. You may have to re-initiate XScan (refer to step 5) after installing the extension. Now, select the option Select on Screen Items. This will allow you to record the items/web elements you wish to interact with.

    Tosca click on Select on Screen items

  9. Here, we record identifiers to elements like the Google search box and the Google search button. Additionally you can create another module that checks the results displayed when the search button is clicked. Once completed you need to click Finish screen and finally Close to save the module.

    Tosca finish screen for record completion

  10. Final Modules screen would look like the following.

    Tosca Modules screen

  11. Go back to the TestCases tab in Tosca and create a test case for BrowserStack Search on Google. You can now select the modules you created earlier and drag them to the new test case. The screen would look like.

    Browserstack test cases on Tosca

  12. We can now add data to the test steps that we added from the modules.

    Tosca test steps

  13. Go back to the Modules tab and select Import Subset to add commonly used modules.

    Tosca import subset

    Select standard.tsu file: Tosca tsu file

    Commonly used modules exported as shown in the following figure: Tosca module imported screen

  14. We need to add the Open URL and Close browser actions, to add these actions go back to the TestCases tab. Click the test case and then press CTRL + T. This will display a list of all the common modules that you can use in your test. Type in OpenUrl and then click the module to be added.

    Tosca open URL

    Type CloseBrowser and select the module.

    Tosca close browser

  15. The final test case should look like the following:

    Tosca final test case

  16. Let’s run the test on a local Chrome browser. First we need to add Test Configuration which will help define capabilities for the browser we wish to run the test on by right clicking on the test case folder and select Create Test configuration parameter. In this case let’s try Chrome.

    Tosca test configuration

  17. To run the test case go back to the Details tab then Right click on the test case and select Run in ScratchBook. This will launch the test on a local Chrome browser.

    Tosca run test example 1

    Once the test executes successfully, the following result window will appear:

    Tosca run test example 2

  18. Finally, to run the test on BrowserStack we update the Test Configuration details as follows. First, add your BrowserStack Username and Access key by selecting PROJECT → Settings → TBox → Engines → XBrowser → WebDriver → BrowserStack.

    Browserstack credentials

    Then back in the Test Configuration add HubAddress and set its value to BrowserStack. Set BrowserStack hub address

    Now run the test and you should see the execution on BrowserStack’s Automate Dashboard. BrowserStack dashboard

  19. You need to follow certain rules while setting the browser and OS capabilities.

    • Set the “Browser” to “Chrome” (This is the TCP Browser that is a compulsory parameter for the test to be triggered from Tosca).

      Tosca test configuration desktop
    • All the other Desired capabilities can now be set using this format Webdriver_<capabilityname>. To specify the Browser capabilities you can use our capability generator.
    • The capabilities that contain . needs to be replaced by double underscore __. More details available in the Tricentis documentation page. For example, set browserstack.local to Webdriver_browserstack__local

You can run your Tosca tests on any browser/os/device combination that BrowserStack supports. You just have to specify them in the capabilities in the above mentioned format i.e. Webdriver_<capabilityname>.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Download Copy